示例#1
0
 def test_hourly_rent(self):
     shop = BikeRental(10)
     hour = datetime.now().hour
     self.assertEqual(shop.rentBikeOnHour(2).hour, hour, 'no assertion')
示例#2
0
 def test_negative_number_of_bikes(self):
     shop = BikeRental(10)
     self.assertEqual(shop.rentBikeOnHour(-3), None, 'should be None')
     self.assertEqual(shop.rentBikeOnHour(0), None, 'should be None')