Пример #1
0
 def test_get_first_table_available_unavailable_2(self):
     # The setup already books the 4 people table from 19:00 to 20:30
     table = booking.get_first_table_available(
         restaurant=self.restaurant_1,
         booking_date_time=datetime(2015, 2, 14, 18, 0, tzinfo=pytz.UTC),
         people=4)
     self.assertEqual(table, None)
Пример #2
0
 def test_unavailable_tables_1_hour_before_opening(self):
     table = booking.get_first_table_available(
         restaurant=self.restaurant_1,
         booking_date_time=datetime(2015, 2, 14, 17, 0, tzinfo=pytz.UTC),
         people=2)
     self.assertEqual(table, None)
Пример #3
0
 def test_get_first_table_available(self):
     table = booking.get_first_table_available(
         restaurant=self.restaurant_1,
         booking_date_time=datetime(2015, 2, 14, 20, 0, tzinfo=pytz.UTC),
         people=2)
     self.assertEqual(table.id, self.restaurant_1_table_1.id)