Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Elliot Gunton <[email protected]>
  • Loading branch information
elliotgunton committed Dec 5, 2024
1 parent d44bb81 commit 016dc4e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/test_unit/test_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@ def test_get_parameter_not_found(self):
with pytest.raises(KeyError):
self.io_mixin.get_parameter("not_exist")

def get_artifact_success(self):
def test_get_artifact_success(self):
self.io_mixin.inputs = ModelInputs(artifacts=[ModelArtifact(name="test")])
param = self.io_mixin.get_artifact("test")
assert param.name == "test"
assert param.value == "{{inputs.parameters.test}}"
artifact = self.io_mixin.get_artifact("test")
assert artifact.name == "test"
assert artifact.from_ == "{{inputs.artifacts.test}}"

def get_artifact_no_inputs(self):
def test_get_artifact_no_inputs(self):
with pytest.raises(KeyError):
self.io_mixin.get_artifact("test")

def get_artifact_no_artifacts(self):
def test_get_artifact_no_artifacts(self):
self.io_mixin.inputs = ModelInputs()
with pytest.raises(KeyError):
self.io_mixin.get_artifact("test")

def get_artifact_not_found(self):
def test_get_artifact_not_found(self):
self.io_mixin.inputs = ModelInputs(artifacts=[ModelArtifact(name="test")])
with pytest.raises(KeyError):
self.io_mixin.get_artifact("not_exist")
Expand Down

0 comments on commit 016dc4e

Please sign in to comment.