Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Black formatting
  • Loading branch information
j4mie committed Apr 9, 2024
commit 90f48fe4c142da458b5d81949ec6b664095832b6
5 changes: 4 additions & 1 deletion django_dbq/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
utc = timezone.utc
except AttributeError:
from datetime import timezone as datetime_timezone

utc = datetime_timezone.utc


Expand Down Expand Up @@ -238,7 +239,9 @@ def test_gets_jobs_in_priority_and_date_order(self):

def test_ignores_jobs_until_run_after_is_in_the_past(self):
job_1 = Job.objects.create(name="testjob")
job_2 = Job.objects.create(name="testjob", run_after=datetime(2021, 11, 4, 8, tzinfo=utc))
job_2 = Job.objects.create(
name="testjob", run_after=datetime(2021, 11, 4, 8, tzinfo=utc)
)

with freezegun.freeze_time(datetime(2021, 11, 4, 7)):
self.assertEqual(
Expand Down