mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 06:04:21 +01:00
Adds missing size field in Builder when loading data from the database
This commit is contained in:
@@ -26,7 +26,11 @@ class Builder:
|
||||
locator_uuid_map = {}
|
||||
|
||||
for uuid, data in appointments_data.items():
|
||||
appointments[uuid] = {"locator": data.get("locator"), "end_time": data.get("end_time")}
|
||||
appointments[uuid] = {
|
||||
"locator": data.get("locator"),
|
||||
"end_time": data.get("end_time"),
|
||||
"size": len(data.get("encrypted_blob")),
|
||||
}
|
||||
|
||||
if data.get("locator") in locator_uuid_map:
|
||||
locator_uuid_map[data.get("locator")].append(uuid)
|
||||
|
||||
@@ -46,6 +46,7 @@ def test_build_appointments():
|
||||
assert uuid in appointments_data.keys()
|
||||
assert appointments_data[uuid].get("locator") == appointment.get("locator")
|
||||
assert appointments_data[uuid].get("end_time") == appointment.get("end_time")
|
||||
assert len(appointments_data[uuid].get("encrypted_blob")) == appointment.get("size")
|
||||
assert uuid in locator_uuid_map[appointment.get("locator")]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user