Verify Account.get_currency_or_parent() returns GncCommodity.
Definition at line 283 of file test_price_and_wrapping.py.
◆ setUp()
| test_price_and_wrapping.TestAccountCurrencyOrParent.setUp |
( |
|
self | ) |
|
Definition at line 286 of file test_price_and_wrapping.py.
286 def setUp(self):
287 self.ses = Session()
288 self.book = self.ses.get_book()
289 table = self.book.get_table()
290 self.usd = table.lookup("CURRENCY", "USD")
291
292 root = self.book.get_root_account()
294 self.acct.SetCommodity(self.usd)
295 root.append_child(self.acct)
296
◆ 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 300 of file test_price_and_wrapping.py.
300 def test_get_currency_or_parent_returns_commodity(self):
301 result = self.acct.get_currency_or_parent()
302 self.assertIsNotNone(result)
303 self.assertIsInstance(result, GncCommodity)
304
305
306
307
308
◆ 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: