forked from routablehq/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_invoice.py
More file actions
30 lines (20 loc) · 778 Bytes
/
test_invoice.py
File metadata and controls
30 lines (20 loc) · 778 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.invoice import Invoice, DeliveryInfo
class InvoiceTests(unittest.TestCase):
def test_unicode(self):
invoice = Invoice()
invoice.TotalAmt = 10
self.assertEquals(str(invoice), "10")
def test_to_LinkedTxn(self):
invoice = Invoice()
invoice.TotalAmt = 10
invoice.Id = 1
linked_txn = invoice.to_linked_txn()
self.assertEquals(linked_txn.TxnId, invoice.Id)
self.assertEquals(linked_txn.TxnType, "Invoice")
self.assertEquals(linked_txn.TxnLineId, 1)
class DeliveryInfoTests(unittest.TestCase):
def test_init(self):
info = DeliveryInfo()
self.assertEquals(info.DeliveryType, "")
self.assertEquals(info.DeliveryTime, "")