GnuCash c935c2f+
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
test_transaction.TransactionSession Class Reference
Inheritance diagram for test_transaction.TransactionSession:
test_book.BookSession test_transaction.TestTransaction

Public Member Functions

 setUp (self)
 
 tearDown (self)
 

Data Fields

 domain1
 
 domain2
 
 hdlr1
 
 hdlr2
 
 trans
 
 split
 
 currency
 
- Data Fields inherited from test_book.BookSession
 ses
 
 book
 
 table
 
 currency
 

Detailed Description

Definition at line 9 of file test_transaction.py.

Member Function Documentation

◆ setUp()

test_transaction.TransactionSession.setUp (   self)

Reimplemented from test_book.BookSession.

Definition at line 10 of file test_transaction.py.

10 def setUp(self):
11 self.domain1 = "gnc.engine"
12 self.domain2 = "gnc.engine.scrub"
13 level = G_LOG_LEVEL_CRITICAL
14 check1 = TestErrorStruct()
15 check1.log_domain = self.domain1
16 check1.log_level = level
17 check1.msg = "[xaccScrubUtilityGetOrMakeAccount()] No currency specified!"
18 test_add_error(check1)
19 check2 = TestErrorStruct()
20 check2.log_domain = self.domain1
21 check2.log_level = level
22 check2.msg = "[xaccTransScrubSplits()] Transaction doesn't have a currency!"
23 test_add_error(check2)
24 self.hdlr1 = test_set_list_handler(self.domain1, level, None)
25 check3 = TestErrorStruct()
26 check3.log_domain = "gnc.engine.scrub"
27 check3.log_level = level
28 check3.msg = "[xaccScrubUtilityGetOrMakeAccount()] No currency specified!"
29 self.hdlr2 = test_set_checked_handler(self.domain2, level, check3)
30 BookSession.setUp(self)
31 self.trans = Transaction(self.book)
32 #Evil bug means we must set a split for the transaction before making
33 #any other changes (is slightly useful for later tests)
34 self.split = Split(self.book)
35 self.split.SetParent(self.trans)
36
37 self.trans.SetCurrency(self.currency)
38
Struct to pass as user_data for the handlers.

◆ tearDown()

test_transaction.TransactionSession.tearDown (   self)

Definition at line 39 of file test_transaction.py.

39 def tearDown(self):
40 g_log_remove_handler(self.domain1, self.hdlr1)
41 g_log_remove_handler(self.domain2, self.hdlr2)
42 test_clear_error_list ()
43

Field Documentation

◆ currency

test_transaction.TransactionSession.currency

Definition at line 37 of file test_transaction.py.

◆ domain1

test_transaction.TransactionSession.domain1

Definition at line 11 of file test_transaction.py.

◆ domain2

test_transaction.TransactionSession.domain2

Definition at line 12 of file test_transaction.py.

◆ hdlr1

test_transaction.TransactionSession.hdlr1

Definition at line 24 of file test_transaction.py.

◆ hdlr2

test_transaction.TransactionSession.hdlr2

Definition at line 29 of file test_transaction.py.

◆ split

test_transaction.TransactionSession.split

Definition at line 34 of file test_transaction.py.

◆ trans

test_transaction.TransactionSession.trans

Definition at line 31 of file test_transaction.py.


The documentation for this class was generated from the following file: