Пример #1
0
 def test_calculate_fee_for_mixed_days_day_reward_customer(self):
     hotel = Hotel('Hotel 2', 5, 150, 120, 190, 150)
     customer = Customer('Customer 2', 'Rewards')
     date_list = [datetime(2019, 11, 1), datetime(2019, 11, 2)]
     self.assertEqual(hotel.calculate_total_fee(date_list, customer.category), 270)
Пример #2
0
 def test_calculate_fee_with_blackout_days(self):
     hotel = Hotel('Hotel 2', 5, 150, 120, 190, 150, [datetime(2019, 12, 25)])
     customer = Customer('Customer 2', 'Rewards')
     date_list = [datetime(2019, 12, 25), datetime(2019, 12, 26)]
     self.assertEqual(hotel.calculate_total_fee(date_list, customer.category), 270)
Пример #3
0
 def test_calculate_fee_for_mixed_days_day_regular_customer(self):
     hotel = Hotel('Hotel 1', 3, 100, 90, 150, 100)
     customer = Customer('Customer 1', 'Regular')
     date_list = [datetime(2019, 11, 1), datetime(2019, 11, 2)]
     self.assertEqual(hotel.calculate_total_fee(date_list, customer.category), 250)
Пример #4
0
 def test_calculate_fee_for_zero_days_regular_customer(self):
     hotel = Hotel('Hotel 1', 3, 100, 90, 150, 100)
     customer = Customer('Customer 1', 'Regular')
     date_list = []
     self.assertEqual(hotel.calculate_total_fee(date_list, customer.category), 0)
Пример #5
0
 def test_calculate_fee_for_one_weekend_day_reward_customer(self):
     hotel = Hotel('Hotel 1', 3, 100, 90, 150, 100)
     customer = Customer('Customer 2', 'Rewards')
     date_list = [datetime(2019, 11, 2)]
     self.assertEqual(hotel.calculate_total_fee(date_list, customer.category), 100)
Пример #6
0
 def test_calculate_fee_for_two_weekend_day_regular_customer(self):
     hotel = Hotel('Hotel 2', 5, 150, 120, 190, 150)
     customer = Customer('Customer 1', 'Regular')
     date_list = [datetime(2019, 11, 2), datetime(2019, 11, 3)]
     self.assertEqual(hotel.calculate_total_fee(date_list, customer.category), 380)
Пример #7
0
 def test_calculate_fee_for_zero_days_reward_customer(self):
     hotel = Hotel('Hotel 2', 5, 150, 120, 190, 150)
     customer = Customer('Customer 2', 'Rewards')
     date_list = []
     self.assertEqual(hotel.calculate_total_fee(date_list, customer.category), 0)