Example #1
0
    def test_to_LinkedTxn(self):
        bill = Bill()
        bill.Id = 10

        linked_txn = bill.to_linked_txn()

        self.assertEquals(linked_txn.TxnId, bill.Id)
        self.assertEquals(linked_txn.TxnType, "Bill")
        self.assertEquals(linked_txn.TxnLineId, 1)
Example #2
0
    def test_to_ref(self):
        bill = Bill()
        bill.DocNumber = "test"
        bill.Id = 100

        ref = bill.to_ref()

        self.assertEquals(ref.name, "test")
        self.assertEquals(ref.type, "Bill")
        self.assertEquals(ref.value, 100)