diff --git a/.vscode/settings.json b/.vscode/settings.json index 2c83d14e..169856c4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -52,6 +52,7 @@ "ncols", "ndarray", "NOQA", + "notreallyatoken", "nqueries", "ntuples", "numpy", diff --git a/tests/test_config.py b/tests/test_config.py index e24c1672..43d9f5c8 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -52,6 +52,21 @@ def test_config_read(tempdir): Configuration.read(config_path="invalid.yaml") +@patch('servicex.configuration.tempfile.gettempdir', return_value="./mytemp") +def test_config_endpoint_dict(tempdir): + os.environ['UserName'] = "p_higgs" + c = Configuration.read(config_path="tests/example_config.yaml") + endpoints = c.endpoint_dict() + assert len(endpoints) == 3 + assert "servicex-uc-af" in endpoints + + # Make sure we get back what we expect + ep = endpoints["servicex-uc-af"] + assert ep.endpoint == "https://servicex.af.uchicago.edu" + assert ep.name == "servicex-uc-af" + assert ep.token == "notreallyatoken" + + @patch('servicex.configuration.tempfile.gettempdir', return_value="./mytemp") def test_default_cache_path(tempdir):