diff --git a/lint-workflow/tests/rules/test_name_capitalized.py b/lint-workflow/tests/rules/test_name_capitalized.py index 77dea76b..41120175 100644 --- a/lint-workflow/tests/rules/test_name_capitalized.py +++ b/lint-workflow/tests/rules/test_name_capitalized.py @@ -64,7 +64,7 @@ def fixture_missing_name_workflow(): return WorkflowBuilder.build(workflow=yaml.load(workflow), from_file=False) -@pytest.fixture(rule="rule") +@pytest.fixture(name="rule") def fixture_rule(): return RuleNameCapitalized() diff --git a/lint-workflow/tests/rules/test_name_exists.py b/lint-workflow/tests/rules/test_name_exists.py index e1e7e6ca..2d2ed977 100644 --- a/lint-workflow/tests/rules/test_name_exists.py +++ b/lint-workflow/tests/rules/test_name_exists.py @@ -1,10 +1,15 @@ """Test src/rules/name_exists.py.""" import pytest +from ruamel.yaml import YAML + from src.load import WorkflowBuilder from src.rules.name_exists import RuleNameExists +yaml = YAML() + + @pytest.fixture(name="correct_workflow") def fixture_correct_workflow(): workflow = """\ @@ -22,7 +27,7 @@ def fixture_correct_workflow(): - name: Test run: echo test """ - return WorkflowBuilder.build(workflow=workflow, from_file=False) + return WorkflowBuilder.build(workflow=yaml.load(workflow), from_file=False) @pytest.fixture(name="incorrect_workflow") @@ -38,7 +43,7 @@ def fixture_incorrect_workflow(): steps: - run: echo test """ - return WorkflowBuilder.build(workflow=workflow, from_file=False) + return WorkflowBuilder.build(workflow=yaml.load(workflow), from_file=False) @pytest.fixture(name="rule")