Exemple #1
0
 def setUp(self):
     self.bill = Bill(5)
Exemple #2
0
 def setUp(self):
     self.bill = Bill(10)
     self.batch = BatchBill([Bill(5), Bill(10), Bill(15)])
     self.desk = CashDesk()
Exemple #3
0
 def setUp(self):
     self.bill5 = Bill(5)
     self.bill10 = Bill(10)
     self.batch = BatchBill([self.bill5, self.bill10])
Exemple #4
0
 def test_value_of_amount(self):
     with self.assertRaises(ValueError):
         Bill(-5)
Exemple #5
0
 def test_type_of_amount(self):
     with self.assertRaises(TypeError):
         Bill("10")
Exemple #6
0
 def test_bill_eq(self):
     bill2 = Bill(10)
     bill3 = Bill(5)
     self.assertNotEqual(self.bill, bill2)
     self.assertEqual(False, self.bill == bill2)
     self.assertEqual(self.bill, bill3)