Skip to content

Commit b5adc92

Browse files
committed
TST: Factor out remaining mock service revision tags
skipci
1 parent 382c405 commit b5adc92

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

tests/cloud/emulators/test_child_emulator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_representation(self):
2020
"""Test that child emulators are represented correctly."""
2121
self.assertEqual(
2222
repr(ChildEmulator(id=f"octue/emulated-child:{MOCK_SERVICE_REVISION_TAG}")),
23-
"<ChildEmulator('octue/emulated-child:2.3.0')>",
23+
f"<ChildEmulator('octue/emulated-child:{MOCK_SERVICE_REVISION_TAG}')>",
2424
)
2525

2626
def test_ask_with_non_dictionary_message(self):

tests/resources/test_child.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_representation(self):
2525
backend={"name": "GCPPubSubBackend", "project_name": "blah"},
2626
)
2727
),
28-
"<Child('octue/my-child:2.3.0')>",
28+
f"<Child('octue/my-child:{MOCK_SERVICE_REVISION_TAG}')>",
2929
)
3030

3131
def test_instantiating_child_without_credentials(self):

tests/test_runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_instantiate_runner(self):
4242
def test_repr(self):
4343
"""Test that runners are represented as a string correctly."""
4444
runner = Runner(app_src=".", twine="{}", service_id=f"octue/my-service:{MOCK_SERVICE_REVISION_TAG}")
45-
self.assertEqual(repr(runner), "<Runner('octue/my-service:2.3.0')>")
45+
self.assertEqual(repr(runner), f"<Runner('octue/my-service:{MOCK_SERVICE_REVISION_TAG}')>")
4646

4747
def test_run_with_configuration_passes(self):
4848
"""Ensures that runs can be made with configuration only"""
@@ -394,7 +394,8 @@ def app(analysis):
394394
self.assertEqual(questions[1]["messages"][1]["exception_type"], "ValueError")
395395
self.assertEqual(
396396
questions[1]["messages"][1]["exception_message"],
397-
"Error in <MockService('octue/yet-another-child:2.3.0')>: Deliberately raised for testing.",
397+
f"Error in <MockService('octue/yet-another-child:{MOCK_SERVICE_REVISION_TAG}')>: Deliberately raised for "
398+
f"testing.",
398399
)
399400

400401
def test_set_up_periodic_monitor_messages(self):

0 commit comments

Comments
 (0)