start Accounts Receivable scenario

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/dogtail@16372 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Ahmed Sayed
2007-07-29 21:13:17 +00:00
parent 573546999d
commit cccc701cf5

View File

@@ -250,7 +250,7 @@ class ScenarioTest(unittest.TestCase):
def setUp(self): def setUp(self):
""" a setup for the test case in this type of test just run gnucash and go dismiss first dialog """ """ a setup for the test case in this type of test just run gnucash and go dismiss first dialog """
#cleanup_all() cleanup_all()
run('gnucash') run('gnucash')
sleep (20) sleep (20)
gnuCash = GnuCashApp() gnuCash = GnuCashApp()
@@ -259,14 +259,13 @@ class ScenarioTest(unittest.TestCase):
def tearDown(self): def tearDown(self):
""" just close gnucash without Saving """ """ just close gnucash without Saving """
gnuCash = GnuCashApp() gnuCash = GnuCashApp()
gnuCash.close_without_saving() # gnuCash.close_without_saving()
def test_new_account_dialog(self): def test_new_account_dialog(self):
""" Test creating new Account currently I could able only to test an account with only 2 levels """ Test creating new Account currently I could able only to test an account with only 2 levels
No validation here No validation here
TODO: add validation TODO: add validation
""" """
config.childrenLimit=500
gnucash = GnuCashApp() gnucash = GnuCashApp()
gnucash.add_new_account_page() gnucash.add_new_account_page()
account_list = [ account_list = [
@@ -329,6 +328,7 @@ class ScenarioTest(unittest.TestCase):
validate_node(account_tab, 'test_perform_transaction') validate_node(account_tab, 'test_perform_transaction')
def test_perform_reconcilation(self): def test_perform_reconcilation(self):
""" Test Reconcilation """
gnucash = GnuCashApp() gnucash = GnuCashApp()
gnucash.open_data_file('mytest2') gnucash.open_data_file('mytest2')
reconcile = gnucash.reconcile_account('Asset') reconcile = gnucash.reconcile_account('Asset')
@@ -349,5 +349,20 @@ class ScenarioTest(unittest.TestCase):
validate_node(reconcileFrame.funds_in, 'test_after_perform_reconcilation_funds_in') validate_node(reconcileFrame.funds_in, 'test_after_perform_reconcilation_funds_in')
validate_node(reconcileFrame.funds_out, 'test_after_perform_reconcilation_funds_out') validate_node(reconcileFrame.funds_out, 'test_after_perform_reconcilation_funds_out')
def test_accounts_receivable(self):
""" Test accounts receivable """
gnucash = GnuCashApp()
gnucash.add_new_account_page()
account_list = [
['Asset', 'Asset'],
['Income', 'Income'],
['Checking', 'Bank', 'Asset'],
['Accounts Receivable', 'A/Receivable', 'Asset'],
['Sales', 'Income', 'Income'],
]
for account in account_list:
gnucash.add_account(*account)
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()