def test_get_door_square(self): door = House() result = [4] door_h_w = [2] split = zip(door_h_w, result) for d, res in split: door.create_door(d, d) self.assertEqual(res, door.get_door_square()) for d in split: result.append(5) door_h_w.append(5) with self.assertRaises(ValueError): door.create_door(d, d)
def test_update_wood_price(self): price = House() price.create_door(2, 2) price.update_wood_price(40) self.assertEqual(160, price.get_door_price("wood"))
def test_update_metal_price(self): price = House() price.create_door(2, 2) price.update_metal_price(15) self.assertEqual(60, price.get_door_price("metal"))
def test_get_door_price(self): price = House() price.create_door(2, 2) self.assertEqual(40, price.get_door_price("wood"))