From 81d368309f401fa42abf3a5da452a3070cee7623 Mon Sep 17 00:00:00 2001
From: Erwan Rouchet <rouchet@teklia.com>
Date: Wed, 24 Mar 2021 12:05:14 +0100
Subject: [PATCH] Fixes

---
 arkindex_worker/worker.py                   |   1 -
 tests/data/cache/lines.sqlite               | Bin 12288 -> 12288 bytes
 tests/data/cache/tables.sqlite              | Bin 12288 -> 12288 bytes
 tests/test_cache.py                         |   4 ++--
 tests/test_elements_worker/test_elements.py |   1 -
 5 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arkindex_worker/worker.py b/arkindex_worker/worker.py
index ec61b14b..541cc286 100644
--- a/arkindex_worker/worker.py
+++ b/arkindex_worker/worker.py
@@ -476,7 +476,6 @@ class ElementsWorker(BaseWorker):
                     CachedElement(
                         id=convert_str_uuid_to_hex(created_ids[idx]["id"]),
                         parent_id=parent_id_hex,
-                        name=element["name"],
                         type=element["type"],
                         polygon=json.dumps(element["polygon"]),
                         worker_version_id=worker_version_id_hex,
diff --git a/tests/data/cache/lines.sqlite b/tests/data/cache/lines.sqlite
index 4294b9b0f3789629fb466debb0d8931f589f9c59..ea881e4f1bb2143f560ca81ac6435842494c95f5 100644
GIT binary patch
delta 88
zcmZojXh@il#de>8?>_(W&4L2?d|ZvGjO^mFvW(5LlTYxaPY&SU#&(N=KbP;;W<iB>
rd~A&ZOzghClkdv8Ox`Z<$<-*p2;|E9a`;Yus4qWxs=VT6ps)Y{?a&+I

delta 127
zcmZojXh@il#kP-uZy*2hjfH-ETup3@?BcSrjLq?rU-G3ZD){+_DENi?_~>vc06|`2
zZmL3vYXndXDn2=Ye;eC12L5cmYnufXPVuof3Ndl``tnbHAm_qpIC;CgCwHR|BS=Kv
Vm&14RLw)(l)8rKy4K@R11OROEB?bTh

diff --git a/tests/data/cache/tables.sqlite b/tests/data/cache/tables.sqlite
index be29e25631f18d386ad8c644ead09e91792a3d43..efc107cd7506757f92df1ee011b670738228b8b2 100644
GIT binary patch
delta 38
ucmZojXh@il#de>8?>_(W&4L2?d|ZvGjO^mFvW(5LlP~h+ZVuyLr2qi^@eE%8

delta 56
zcmZojXh@il#de&5?>PVQjfLTST#dDi?BcSrjLp82U-IP&<t65(DulR3geds=197O2
K&*lLB4GI7rD-uZn

diff --git a/tests/test_cache.py b/tests/test_cache.py
index eb1969b3..fb3c28a1 100644
--- a/tests/test_cache.py
+++ b/tests/test_cache.py
@@ -76,10 +76,10 @@ def test_create_tables():
         name = table["name"]
         expected_table = expected_cache.cursor.execute(
             f"SELECT sql FROM sqlite_master WHERE name = '{name}'"
-        ).fetchone()
+        ).fetchone()["sql"]
         generated_table = cache.cursor.execute(
             f"SELECT sql FROM sqlite_master WHERE name = '{name}'"
-        ).fetchone()
+        ).fetchone()["sql"]
         assert expected_table == generated_table
 
 
diff --git a/tests/test_elements_worker/test_elements.py b/tests/test_elements_worker/test_elements.py
index 776885fa..b0ad3486 100644
--- a/tests/test_elements_worker/test_elements.py
+++ b/tests/test_elements_worker/test_elements.py
@@ -691,7 +691,6 @@ def test_create_elements(responses, mock_elements_worker_with_cache):
         CachedElement(
             id=convert_str_uuid_to_hex("497f6eca-6276-4993-bfeb-53cbbbba6f08"),
             parent_id=convert_str_uuid_to_hex("12341234-1234-1234-1234-123412341234"),
-            name="0",
             type="something",
             polygon=json.dumps([[1, 1], [2, 2], [2, 1], [1, 2]]),
             worker_version_id=convert_str_uuid_to_hex(
-- 
GitLab