Refs #273 -- Add backwards migration (noop) and fix tests

This commit is contained in:
Raphael Michel
2016-10-20 17:56:48 +02:00
parent 32d00e4313
commit 05ecfdb9e2
2 changed files with 4 additions and 4 deletions

View File

@@ -27,5 +27,5 @@ class Migration(migrations.Migration):
]
operations = [
migrations.RunPython(forwards)
migrations.RunPython(forwards, migrations.RunPython.noop)
]

View File

@@ -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