Add JSONField for device metadata (#2550)

This commit is contained in:
Raphael Michel
2022-03-24 11:55:44 +01:00
committed by GitHub
parent 2486c3d205
commit 9e5403333c
5 changed files with 33 additions and 3 deletions

View File

@@ -128,11 +128,15 @@ def test_update_valid_fields(device_client, device: Device):
'hardware_brand': 'Samsung',
'hardware_model': 'Galaxy S',
'software_brand': 'pretixdroid',
'software_version': '5.0.0'
})
'software_version': '5.0.0',
'info': {
'foo': 'bar'
},
}, format='json')
assert resp.status_code == 200
device.refresh_from_db()
assert device.software_version == '5.0.0'
assert device.info == {'foo': 'bar'}
@pytest.mark.django_db