forked from routablehq/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_account.py
More file actions
30 lines (21 loc) · 775 Bytes
/
test_account.py
File metadata and controls
30 lines (21 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import unittest
from quickbooks import QuickBooks
from quickbooks.objects.account import Account
class AccountTests(unittest.TestCase):
def test_unicode(self):
account = Account()
account.FullyQualifiedName = "test"
self.assertEquals(str(account), "test")
def test_to_ref(self):
account = Account()
account.FullyQualifiedName = "test"
account.Id = 12
ref = account.to_ref()
self.assertEquals(ref.name, "test")
self.assertEquals(ref.type, "Account")
self.assertEquals(ref.value, 12)
def test_valid_object_name(self):
account = Account()
client = QuickBooks()
result = client.isvalid_object_name(account.qbo_object_name)
self.assertTrue(result)