From 6ef54eb3afe0c6f0df640f7e46167ce2f2e14602 Mon Sep 17 00:00:00 2001 From: Sergey Golitsynskiy Date: Thu, 20 Jan 2022 22:45:36 -0500 Subject: [PATCH] Stub out config call in test_scripts; fixes package test --- test/unit/data/model/migrations/test_scripts.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unit/data/model/migrations/test_scripts.py b/test/unit/data/model/migrations/test_scripts.py index 80bf41f7ce9..c42529fcfc9 100644 --- a/test/unit/data/model/migrations/test_scripts.py +++ b/test/unit/data/model/migrations/test_scripts.py @@ -6,6 +6,16 @@ from galaxy.model.migrations.scripts import ( ) +@pytest.fixture(autouse=True) +def set_db_urls(monkeypatch): + # Do not try to access galaxy config; values not needed. + def no_config_call(self): + self.gxy_url = 'a string' + self.tsi_url = 'a stirng' + + monkeypatch.setattr(LegacyScripts, '_get_db_urls', no_config_call) + + @pytest.fixture(autouse=True) # set combined db for all tests def set_combined(monkeypatch): monkeypatch.setattr(LegacyScripts, '_is_one_database', lambda self: True)