Verify Account.get_currency_or_parent() returns GncCommodity.
Definition at line 284 of file test_price_and_wrapping.py.
◆ setUp()
| test_price_and_wrapping.TestAccountCurrencyOrParent.setUp |
( |
|
self | ) |
|
Definition at line 287 of file test_price_and_wrapping.py.
287 def setUp(self):
288 self.ses = Session()
289 self.book = self.ses.get_book()
290 table = self.book.get_table()
291 self.usd = table.lookup("CURRENCY", "USD")
292
293 root = self.book.get_root_account()
295 self.acct.SetCommodity(self.usd)
296 root.append_child(self.acct)
297
◆ tearDown()
| test_price_and_wrapping.TestAccountCurrencyOrParent.tearDown |
( |
|
self | ) |
|
◆ test_get_currency_or_parent_returns_commodity()
| test_price_and_wrapping.TestAccountCurrencyOrParent.test_get_currency_or_parent_returns_commodity |
( |
|
self | ) |
|
Definition at line 301 of file test_price_and_wrapping.py.
301 def test_get_currency_or_parent_returns_commodity(self):
302 result = self.acct.get_currency_or_parent()
303 self.assertIsNotNone(result)
304 self.assertIsInstance(result, GncCommodity)
305
306
307
308
309
◆ acct
| test_price_and_wrapping.TestAccountCurrencyOrParent.acct |
◆ book
| test_price_and_wrapping.TestAccountCurrencyOrParent.book |
◆ ses
| test_price_and_wrapping.TestAccountCurrencyOrParent.ses |
◆ usd
| test_price_and_wrapping.TestAccountCurrencyOrParent.usd |
The documentation for this class was generated from the following file: