forked from CGM_Public/pretix_original
Make device token revokation more explicit
This commit is contained in:
@@ -72,7 +72,8 @@ def test_device_auth_valid(client, device):
|
||||
@pytest.mark.django_db
|
||||
def test_device_auth_revoked(client, device):
|
||||
client.credentials(HTTP_AUTHORIZATION='Device ' + device.api_token)
|
||||
device.api_token = None
|
||||
device.revoked = True
|
||||
device.save()
|
||||
resp = client.get('/api/v1/organizers/')
|
||||
assert resp.status_code == 401
|
||||
assert str(resp.data['detail']) == "Device access has been revoked."
|
||||
|
||||
Reference in New Issue
Block a user