From 774504bce2cb6905dac811613988b665ec3eb5b7 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Tue, 26 Oct 2021 19:43:26 -0700 Subject: [PATCH] Prevent potential sleep entry intersection errors in tests --- core/tests/tests_forms.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/tests/tests_forms.py b/core/tests/tests_forms.py index b665b008..e537d03a 100644 --- a/core/tests/tests_forms.py +++ b/core/tests/tests_forms.py @@ -334,6 +334,9 @@ class SleepFormsTestCase(FormsTestCaseBase): ) def test_add(self): + # Prevent potential sleep entry intersection errors. + models.Sleep.objects.all().delete() + end = timezone.localtime() start = end - timezone.timedelta(minutes=2) params = {