Skip to content

Commit

Permalink
Update Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBurchLog committed Sep 13, 2024
1 parent b1fd515 commit ec68587
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/rest/system_client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def easy_client(monkeypatch, bg_system):
mock = Mock(name="easy_client")
mock.find_unique_system.return_value = bg_system
mock.find_systems.return_value = [bg_system]
mock.get_config.return_value = {"garden_name":bg_system.namespace}
mock.client.bg_host = "localhost"
mock.client.bg_port = 3000

Expand Down Expand Up @@ -104,7 +105,7 @@ def test_latest(self, client, easy_client, bg_system, bg_system_2):
assert client.bg_system == bg_system_2
assert client.bg_default_instance == "default"
easy_client.find_systems.assert_called_once_with(
name=bg_system.name, namespace="", filter_latest=True
name=bg_system.name, namespace="ns", filter_latest=True
)

@pytest.mark.parametrize(
Expand All @@ -120,7 +121,7 @@ def test_non_latest(self, client, easy_client, bg_system, constraint, systems):
assert client.bg_system == bg_system

easy_client.find_unique_system.assert_called_once_with(
name=bg_system.name, version=constraint, namespace=""
name=bg_system.name, version=constraint, namespace="ns"
)

def test_failure_with_constraint(self, client, easy_client):
Expand Down Expand Up @@ -219,7 +220,7 @@ def test_non_plugin(self):
assert client._system_name is None
assert client._version_constraint == "latest"
assert client._default_instance == "default"
assert client._system_namespace == ""
assert client._system_namespace == "ns"


class TestCreateRequest(object):
Expand Down

0 comments on commit ec68587

Please sign in to comment.