import emission.core.get_database as edb
from uuid import UUID

def map_uuid_to_label(uuid, label):
    ur = edb.get_uuid_db().update_one({"uuid": uuid},
                             {"$set": {"user_email": label}})
    print(ur.raw_result)
    assert(ur.matched_count == 1)
    assert(ur.modified_count == 1)

if __name__ == '__main__':
    map_uuid_to_label(UUID("04bc05b3-4c2d-4138-bfbb-7eb45dce709a"), "ucb.sdb.iphone.3")
    map_uuid_to_label(UUID("1c8fac56-6157-4a5e-aa55-03481cad1376"), "ucb.sdb.iphone.4")

@@ -363,44 +363,401 @@
 ID(%22
-04bc05b3-4c2d-4138-bfbb-7eb45dce709a
+e471711e-bd14-3dbe-80b6-9c7d92ecc296%22), %22ucb.sdb.android.1%22)%0A    map_uuid_to_label(UUID(%22fd7b4c2e-2c8b-3bfa-94f0-d1e3ecbd5fb7%22), %22ucb.sdb.android.2%22)%0A    map_uuid_to_label(UUID(%2286842c35-da28-32ed-a90e-2da6663c5c73%22), %22ucb.sdb.android.3%22)%0A    map_uuid_to_label(UUID(%223bc0f91f-7660-34a2-b005-5c399598a369%22), %22ucb.sdb.android.4%22)%0A%0A    map_uuid_to_label(UUID(%22079e0f1a-c440-3d7c-b0e7-de160f748e35
 %22), 
@@ -772,17 +772,17 @@
 .iphone.
-3
+1
 %22)%0A    m
@@ -808,64 +808,572 @@
 ID(%22
-1c8fac56-6157-4a5e-aa55-03481cad1376%22), %22ucb.sdb.iphone.4
+c76a0487-7e5a-3b17-a449-47be666b36f6%22), %22ucb.sdb.iphone.2%22)%0A    map_uuid_to_label(UUID(%22c528bcd2-a88b-3e82-be62-ef4f2396967a%22), %22ucb.sdb.iphone.3%22)%0A    map_uuid_to_label(UUID(%2295e70727-a04e-3e33-b7fe-34ab19194f8b%22), %22ucb.sdb.iphone.4%22)%0A%0A    map_uuid_to_label(UUID(%2270968068-dba5-406c-8e26-09b548da0e4b%22), %22nexus7itu01%22)%0A    map_uuid_to_label(UUID(%226561431f-d4c1-4e0f-9489-ab1190341fb7%22), %22nexus7itu02%22)%0A%0A    map_uuid_to_label(UUID(%2292cf5840-af59-400c-ab72-bab3dcdf7818%22), %22motoeitu01%22)%0A    map_uuid_to_label(UUID(%2293e8a1cc-321f-4fa9-8c3c-46928668e45d%22), %22motoeitu02
 %22)%0A

Use the actual mappings instead of test mappings