GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
test_account.py
1 from unittest import main
2 
3 from gnucash import Book, Account, Split
4 
5 from test_book import BookSession
6 
8  def setUp(self):
9  BookSession.setUp(self)
10  self.account = Account(self.book)
11 
13  def test_name(self):
14  NAME = "Money"
15  self.assertEquals( '', self.account.GetName() )
16  self.account.SetName(NAME)
17  self.assertEquals( NAME, self.account.GetName() )
18 
19  def test_split(self):
20  SPLIT = Split(self.book)
21  self.assertTrue(self.account.insert_split(SPLIT))
22  self.assertTrue(self.account.remove_split(SPLIT))
23 
24 if __name__ == '__main__':
25  main()
struct account_s Account
Account in Gnucash. This is the typename for an account. The actual structure is defined in the priva...
Definition: gnc-engine.h:132
struct split_s Split
Split in Gnucash. A "split" is more commonly referred to as a "entry" in a "transaction". Each split belongs to one Account and one Transaction. The split is one out of several parts a Transaction is divided into.
Definition: gnc-engine.h:144