Skip to content
Snippets Groups Projects
Commit 0a4bbe4b authored by Eva Bardou's avatar Eva Bardou
Browse files

Fix some review related code snippets

parent 5aa47513
No related branches found
No related tags found
1 merge request!67Store created elements in a local SQLite database
Pipeline #78296 passed
......@@ -6,7 +6,7 @@ from arkindex_worker import logger
SQL_ELEMENTS_TABLE_CREATION = """CREATE TABLE IF NOT EXISTS elements (
id VARCHAR(32) PRIMARY KEY,
parent_id VARCHAR(32) NOT NULL,
parent_id VARCHAR(32),
name TEXT NOT NULL,
type TEXT NOT NULL,
polygon TEXT,
......@@ -17,8 +17,8 @@ SQL_ELEMENTS_TABLE_CREATION = """CREATE TABLE IF NOT EXISTS elements (
CachedElement = namedtuple(
"CachedElement",
["id", "parent_id", "name", "type", "polygon", "worker_version_id", "initial"],
defaults=[0],
["id", "name", "type", "polygon", "worker_version_id", "parent_id", "initial"],
defaults=[None, 0],
)
......
No preview for this file type
......@@ -60,7 +60,7 @@ def test_create_tables_existing_table():
with open(db_path, "rb") as after_file:
after = after_file.read()
assert before == after
assert before == after, "Cache was modified"
def test_create_tables():
......@@ -113,7 +113,7 @@ def test_insert_existing_lines():
with open(db_path, "rb") as after_file:
after = after_file.read()
assert before == after
assert before == after, "Cache was modified"
def test_insert():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment