Merge pull request #2019 from ryanpetrello/back-to-the-future

fix a failing timezone test
This commit is contained in:
Ryan Petrello 2018-06-01 10:14:22 -04:00 committed by GitHub
commit 330691f4a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,11 +131,11 @@ def test_leap_year_day(job_template):
@pytest.mark.django_db
@pytest.mark.parametrize('until, dtend', [
['20180602T170000Z', '2018-06-02 12:00:00+00:00'],
['20180602T000000Z', '2018-06-01 12:00:00+00:00'],
['20300602T170000Z', '2030-06-02 12:00:00+00:00'],
['20300602T000000Z', '2030-06-01 12:00:00+00:00'],
])
def test_utc_until(job_template, until, dtend):
rrule = 'DTSTART:20180601T120000Z RRULE:FREQ=DAILY;INTERVAL=1;UNTIL={}'.format(until)
rrule = 'DTSTART:20300601T120000Z RRULE:FREQ=DAILY;INTERVAL=1;UNTIL={}'.format(until)
s = Schedule(
name='Some Schedule',
rrule=rrule,
@ -143,7 +143,7 @@ def test_utc_until(job_template, until, dtend):
)
s.save()
assert str(s.next_run) == '2018-06-01 12:00:00+00:00'
assert str(s.next_run) == '2030-06-01 12:00:00+00:00'
assert str(s.next_run) == str(s.dtstart)
assert str(s.dtend) == dtend