Skip to content

Commit

Permalink
fix check database name
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledk2 committed Sep 7, 2024
1 parent afe8731 commit dd27fcd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion unit_tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,15 @@ def test_query_database(self):
data_source
].execute_query(sql)
self.assertIsNotNone(res)
self.assertEqual(res[0]["current_database"], search_omero_app.config.database_connectors[data_source]["DATABASE_NAME"])
found_db_name=False
for source in search_omero_app.config.get("DATA_SOURCES"):
if source.get("DATABASE").get("DATABASE_NAME")==res[0]["current_database"]:
found_db_name=True
break

self.assertTrue(found_db_name)
#self.assertEqual(res[0]["current_database"], search_omero_app.config.database_connectors[data_source]["DATABASE_NAME"])
#self.assertEqual(res[0]["current_database"], search_omero_app.config.database_connectors[data_source]["DATABASE_NAME"])

def validate_json_syntax(self, json_template):
try:
Expand Down

0 comments on commit dd27fcd

Please sign in to comment.