Skip to content

Commit

Permalink
Merge pull request #66 from Koed00/dev
Browse files Browse the repository at this point in the history
tests orm queue admin overrides
  • Loading branch information
Koed00 committed Sep 17, 2015
2 parents ef9079a + 3ecd47f commit 8ec07cd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion django_q/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ def test_admin_views(admin_client):
response = admin_client.post(url, data)
assert response.status_code == 302
assert Failure.objects.filter(name=f.id).exists() is False
# change q
url = reverse('admin:django_q_ormq_change', args=(q.id,))
data = {'key': 'default', 'payload': 'test', 'lock_0': '2015-09-17', 'lock_1': '14:31:51', '_save': 'Save'}
response = admin_client.post(url, data)
assert response.status_code == 302
# delete q
url = reverse('admin:django_q_ormq_delete', args=(q.id,))
data = {'post': 'yes'}
response = admin_client.post(url, data)
assert response.status_code == 302
# cleanup
q.delete()
Conf.ORM = None

0 comments on commit 8ec07cd

Please sign in to comment.