Skip to content
Snippets Groups Projects
Commit b9490fcf authored by florian's avatar florian
Browse files

FIX: Use select queries in mock

parent 2393d33c
No related branches found
No related tags found
2 merge requests!89ENH: JsonSchemaExporter accepts do_not_create parameter.,!81F schema export references
...@@ -41,13 +41,13 @@ def _mock_execute_query(query_string, unique=False, **kwargs): ...@@ -41,13 +41,13 @@ def _mock_execute_query(query_string, unique=False, **kwargs):
]) ])
all_records.extend(other_type_records) all_records.extend(other_type_records)
if query_string == "FIND RECORD 'OtherType'": if query_string == "SELECT name, id FROM RECORD 'OtherType'":
return other_type_records return other_type_records
elif query_string == "FIND RECORDTYPE 'OtherType'" and unique is True: elif query_string == "FIND RECORDTYPE 'OtherType'" and unique is True:
return other_type_rt return other_type_rt
elif query_string == "FIND RECORD": elif query_string == "SELECT name, id FROM RECORD":
return all_records return all_records
elif query_string == "FIND FILE": elif query_string == "SELECT name, id FROM FILE":
return all_files return all_files
else: else:
return db.Container() return db.Container()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment