mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
Refs #273 -- Add backwards migration (noop) and fix tests
This commit is contained in:
@@ -27,5 +27,5 @@ class Migration(migrations.Migration):
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(forwards)
|
||||
migrations.RunPython(forwards, migrations.RunPython.noop)
|
||||
]
|
||||
|
||||
@@ -443,7 +443,7 @@ def test_order_extend_not_expired(client, env):
|
||||
}, follow=True)
|
||||
assert 'alert-success' in response.rendered_content
|
||||
o = Order.objects.get(id=env[2].id)
|
||||
assert o.expires.strftime("%Y-%m-%d %H:%M:%S") == newdate
|
||||
assert o.expires.strftime("%Y-%m-%d %H:%M:%S") == newdate[:10] + " 23:59:59"
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@@ -460,7 +460,7 @@ def test_order_extend_overdue_quota_empty(client, env):
|
||||
}, follow=True)
|
||||
assert 'alert-success' in response.rendered_content
|
||||
o = Order.objects.get(id=env[2].id)
|
||||
assert o.expires.strftime("%Y-%m-%d %H:%M:%S") == newdate
|
||||
assert o.expires.strftime("%Y-%m-%d %H:%M:%S") == newdate[:10] + " 23:59:59"
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@@ -478,7 +478,7 @@ def test_order_extend_expired_quota_left(client, env):
|
||||
}, follow=True)
|
||||
assert 'alert-success' in response.rendered_content
|
||||
o = Order.objects.get(id=env[2].id)
|
||||
assert o.expires.strftime("%Y-%m-%d %H:%M:%S") == newdate
|
||||
assert o.expires.strftime("%Y-%m-%d %H:%M:%S") == newdate[:10] + " 23:59:59"
|
||||
assert o.status == Order.STATUS_PENDING
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user