change sid for wbid in tests

This commit is contained in:
Cayo Puigdefabregas 2022-04-25 11:54:16 +02:00
parent a362c8644b
commit 531e213eff
6 changed files with 11 additions and 11 deletions

View File

@ -2,7 +2,7 @@
"timestamp": "2022-03-31T19:09:57.167164",
"type": "Snapshot",
"uuid": "cdecaf47-6e32-4ccb-b689-95c064d8c514",
"wbid": "MLKO1Y0R55XZM051WQ5KJM01RY44Q",
"sid": "MLKO1Y0R55XZM051WQ5KJM01RY44Q",
"software": "Workbench",
"version": "2022.03.00",
"schema_api": "1.0.0",

View File

@ -2,7 +2,7 @@
"timestamp": "2022-04-01 06:28:54.099394",
"type": "Snapshot",
"uuid": "232b44f3-b139-490e-90c8-2748a4523e80",
"wbid": "YKPZ27NJ2NMRO4893M4L5NRZV5YJ1",
"sid": "YKPZ27NJ2NMRO4893M4L5NRZV5YJ1",
"software": "Workbench",
"version": "2022.03.00",
"schema_api": "1.0.0",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3375,5 +3375,5 @@
"type": "Snapshot",
"uuid": "b7438448-7852-42c6-ad22-0963cf7c5b43",
"version": "2022.03.3-alpha",
"wbid": "LYWP7"
}
"sid": "LYWP7"
}

View File

@ -970,7 +970,7 @@ def test_snapshot_wb_lite(user: UserClient):
ssd = [x for x in body['components'] if x['type'] == 'SolidStateDrive'][0]
assert body['device']['manufacturer'] == 'lenovo'
# assert body['wbid'] == "LXVC"
# assert body['sid'] == "LXVC"
assert ssd['serialNumber'] == 's35anx0j401001'
assert res.status == '201 CREATED'
assert '00:28:f8:a6:d5:7e' in body['device']['hid']
@ -991,7 +991,7 @@ def test_snapshot_wb_lite_qemu(user: UserClient):
)
body, res = user.post(snapshot, uri="/api/inventory/")
assert body['wbid'] == "VL0L5"
assert body['sid'] == "VL0L5"
assert res.status == '201 CREATED'
dev = m.Device.query.filter_by(id=body['device']['id']).one()
@ -1021,7 +1021,7 @@ def test_snapshot_wb_lite_old_snapshots(user: UserClient):
'timestamp': snapshot_11['endTime'],
'type': 'Snapshot',
'uuid': str(uuid.uuid4()),
'wbid': 'MLKO1',
'sid': 'MLKO1',
'software': 'Workbench',
'version': '2022.03.00',
"schema_api": "1.0.0",
@ -1077,7 +1077,7 @@ def test_snapshot_errors(user: UserClient):
'timestamp': snapshot_11['endTime'],
'type': 'Snapshot',
'uuid': str(uuid.uuid4()),
'wbid': 'MLKO1',
'sid': 'MLKO1',
'software': 'Workbench',
'version': '2022.03.00',
"schema_api": "1.0.0",
@ -1129,7 +1129,7 @@ def test_snapshot_errors_timestamp(user: UserClient):
assert res.status_code == 201
assert len(SnapshotErrors.query.all()) == 1
error = SnapshotErrors.query.all()[0]
assert snapshot_lite['wbid'] == error.wbid
assert snapshot_lite['sid'] == error.sid
assert user.user['id'] == str(error.owner_id)