Ejemplo n.º 1
0
 def setUp(self):
     self.bill = Bill(5)
Ejemplo n.º 2
0
 def setUp(self):
     self.bill = Bill(10)
     self.batch = BatchBill([Bill(5), Bill(10), Bill(15)])
     self.desk = CashDesk()
Ejemplo n.º 3
0
 def setUp(self):
     self.bill5 = Bill(5)
     self.bill10 = Bill(10)
     self.batch = BatchBill([self.bill5, self.bill10])
Ejemplo n.º 4
0
 def test_value_of_amount(self):
     with self.assertRaises(ValueError):
         Bill(-5)
Ejemplo n.º 5
0
 def test_type_of_amount(self):
     with self.assertRaises(TypeError):
         Bill("10")
Ejemplo n.º 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)