Add device security profiles (#1806)

This commit is contained in:
Raphael Michel
2020-10-13 17:40:25 +02:00
committed by GitHub
parent 301849f771
commit e8f3ad633a
15 changed files with 177 additions and 10 deletions

View File

@@ -50,8 +50,8 @@ def test_create_device(event, admin_user, admin_team, client):
resp = client.post('/control/organizer/dummy/device/add', {
'name': 'Foo',
'limit_events': str(event.pk),
'security_profile': 'full',
}, follow=True)
print(resp.status_code, resp.content)
with scopes_disabled():
d = Device.objects.last()
assert d.name == 'Foo'
@@ -66,6 +66,7 @@ def test_update_device(event, admin_user, admin_team, device, client):
client.post('/control/organizer/dummy/device/{}/edit'.format(device.pk), {
'name': 'Cashdesk 2',
'limit_events': str(event.pk),
'security_profile': 'full',
}, follow=True)
device.refresh_from_db()
assert device.name == 'Cashdesk 2'