Skip to content
Snippets Groups Projects

Add support for request keywords in gwdatafind.ui

Merged Duncan Macleod requested to merge duncanmmacleod/gwdatafind:request_kw into main
2 files
+ 54
9
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -17,6 +17,7 @@
# along with GWDataFind. If not, see <http://www.gnu.org/licenses/>.
import warnings
from functools import partial
from unittest import mock
import pytest
@@ -58,6 +59,17 @@ def gwdatafind_server_env():
yield
@yield_fixture(autouse=True, scope="module")
def noauth():
"""Force the underlying _get() function to use no authentication
So that the tests don't fall over if the test runner has bad creds.
"""
_get_noauth = partial(ui._get, cert=False, token=False)
with mock.patch("gwdatafind.ui._get", _get_noauth):
yield
@pytest.mark.parametrize(("in_", "url"), (
# no scheme and no port, default to https
("datafind.example.com", "https://datafind.example.com"),
Loading