Fix #3360 -- Allow to revoke devices before initialized

This commit is contained in:
Raphael Michel
2023-06-04 18:06:00 +02:00
parent 0d93f7f52f
commit 35350a13d6
5 changed files with 39 additions and 7 deletions

View File

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