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