Skip to content

Commit

Permalink
Fix slot viewset test, clear slots before running the test
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Jan 19, 2025
1 parent a053f09 commit b1de93d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions care/emr/tests/test_booking_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,10 @@ def test_over_booking_a_slot(self):

def test_get_slots_for_day(self):
"""Users can get available slots for a specific day."""

# we don't want the slot that was created in setUp;
self.slot.delete()

data = {
"user": self.user.external_id,
"day": datetime.now(UTC).strftime("%Y-%m-%d"),
Expand All @@ -598,6 +602,10 @@ def test_get_slots_for_day(self):

def test_hit_on_get_slots_for_day_does_not_cause_duplicate_slots(self):
"""Multiple requests to get slots for a day should not create duplicate slots."""

# we don't want the slot that was created in setUp;
self.slot.delete()

data = {
"user": self.user.external_id,
"day": datetime.now(UTC).strftime("%Y-%m-%d"),
Expand Down

0 comments on commit b1de93d

Please sign in to comment.