Definition at line 20 of file test_session.py.
◆ test_session_deprecated_arguments()
def test_session.TestSession.test_session_deprecated_arguments |
( |
|
self | ) |
|
use deprecated arguments ignore_lock, is_new, force_new
Definition at line 24 of file test_session.py.
24 def test_session_deprecated_arguments(self):
25 """use deprecated arguments ignore_lock, is_new, force_new""" 26 self.ses = Session(ignore_lock=
False, is_new=
True, force_new=
False)
◆ test_session_mode()
def test_session.TestSession.test_session_mode |
( |
|
self | ) |
|
use mode argument
Definition at line 28 of file test_session.py.
28 def test_session_mode(self):
29 """use mode argument""" 30 self.ses = Session(mode=SessionOpenMode.SESSION_NORMAL_OPEN)
◆ test_session_with_new_file()
def test_session.TestSession.test_session_with_new_file |
( |
|
self | ) |
|
create Session with new xml file
Definition at line 32 of file test_session.py.
32 def test_session_with_new_file(self):
33 """create Session with new xml file""" 34 from tempfile
import TemporaryDirectory
35 from urllib.parse
import urlunparse
36 with TemporaryDirectory()
as tempdir:
37 uri = urlunparse((
"xml", tempdir,
"tempfile",
"",
"",
""))
38 with Session(uri, SessionOpenMode.SESSION_NEW_STORE)
as ses:
42 uri = urlunparse((
"xml", tempdir,
"tempfile2",
"",
"",
""))
43 with Session()
as ses:
44 with self.assertRaises(GnuCashBackendException):
45 ses.begin(uri, mode=SessionOpenMode.SESSION_NORMAL_OPEN)
49 uri = urlunparse((
"xml", tempdir,
"tempfile2",
"",
"",
""))
50 with Session()
as ses:
51 with self.assertRaises(GnuCashBackendException):
52 ses.begin(uri, is_new=
False)
54 uri = urlunparse((
"xml", tempdir,
"tempfile3",
"",
"",
""))
55 with Session()
as ses:
56 ses.begin(uri, mode=SessionOpenMode.SESSION_NEW_STORE)
59 uri = urlunparse((
"xml", tempdir,
"tempfile4",
"",
"",
""))
60 with Session()
as ses:
61 ses.begin(uri, is_new=
True)
The documentation for this class was generated from the following file: