コード例 #1
0
 def test_creation(self):
     il = InvoiceLine()
     il.quantity = 11
     il.price = 2
     il.item_name = 'test'
     il.tax_percent = 0.21
     il.tax_category = "S"
     assert il.is_valid()
コード例 #2
0
 def test_invalid_price(self):
     il = InvoiceLine()
     with pytest.raises(ValueError):
         il.price = "dasdas"