mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fix #3360 -- Allow to revoke devices before initialized
This commit is contained in:
@@ -110,6 +110,17 @@ def test_revoke_device(event, admin_user, admin_team, device, client):
|
||||
assert device.revoked
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_revoke_device_before_initialization(event, admin_user, admin_team, device, client):
|
||||
client.login(email='dummy@dummy.dummy', password='dummy')
|
||||
device.save()
|
||||
|
||||
client.get('/control/organizer/dummy/device/{}/revoke'.format(device.pk))
|
||||
client.post('/control/organizer/dummy/device/{}/revoke'.format(device.pk), {}, follow=True)
|
||||
device.refresh_from_db()
|
||||
assert device.revoked
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_bulk_update_device(event, admin_user, admin_team, device, client):
|
||||
client.login(email='dummy@dummy.dummy', password='dummy')
|
||||
|
||||
Reference in New Issue
Block a user