7 Session, GnuCashBackendException, \
8 ERR_BACKEND_LOCKED, ERR_FILEIO_FILE_NOT_FOUND
10 FILE_1 =
"/tmp/not_there.xac"
11 FILE_2 =
"/tmp/example_file.xac"
16 session = Session(FILE_1)
17 except GnuCashBackendException, backend_exception:
18 assert( ERR_FILEIO_FILE_NOT_FOUND
in backend_exception.errors)
22 session = Session(
"xml://%s" % FILE_2, is_new=
True)
28 session = Session(FILE_2)
30 session_2 = Session(FILE_2)
31 except GnuCashBackendException, backend_exception:
32 assert( ERR_BACKEND_LOCKED
in backend_exception.errors )