forked from routablehq/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_vendor.py
More file actions
30 lines (20 loc) · 744 Bytes
/
test_vendor.py
File metadata and controls
30 lines (20 loc) · 744 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.objects.vendor import Vendor, ContactInfo
class VendorTests(unittest.TestCase):
def test_unicode(self):
vendor = Vendor()
vendor.DisplayName = "test"
self.assertEquals(str(vendor), "test")
def test_to_ref(self):
vendor = Vendor()
vendor.DisplayName = "test"
vendor.Id = 100
ref = vendor.to_ref()
self.assertEquals(ref.name, "test")
self.assertEquals(ref.type, "Vendor")
self.assertEquals(ref.value, 100)
class ContactInfoTests(unittest.TestCase):
def test_init(self):
contact_info = ContactInfo()
self.assertEquals(contact_info.Type, "")
self.assertEquals(contact_info.Telephone, None)