Skip to content

Commit

Permalink
refactor: fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lieryan committed Mar 14, 2024
1 parent ddde3a0 commit 5f041cc
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/test_core.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# type: ignore
from invoke import MockContext

import yaml
from pytest import fixture
from textwrap import dedent

import gitops.utils.kube as kube
from invoke import MockContext
from pytest import fixture

import gitops.utils.apps as apps
from gitops import core

Expand All @@ -14,10 +12,12 @@
def mock_invoke_run(monkeypatch):
monkeypatch.setattr(core, "run", lambda cmd: None)


@fixture
def confirm_yes(monkeypatch):
monkeypatch.setattr(apps, "confirm", lambda: True)


@fixture
def sample_app(tmp_path, monkeypatch):
monkeypatch.setattr(apps, "get_apps_directory", lambda: tmp_path)
Expand Down Expand Up @@ -50,7 +50,7 @@ def test_setenv_should_not_overwrite_if_there_is_existing_variable(
deployment_yml,
confirm_yes,
):
file = deployment_yml(
file = deployment_yml( # noqa: F841
"""\
namespace: test
chart: test
Expand Down Expand Up @@ -112,7 +112,7 @@ def test_setenv_should_not_overwrite_if_only_ordering_has_changed(
deployment_yml,
confirm_yes,
):
file = deployment_yml(
file = deployment_yml( # noqa: F841
"""\
namespace: test
chart: test
Expand Down Expand Up @@ -155,7 +155,7 @@ def test_unset_nonexistent_environment_variable(
deployment_yml,
confirm_yes,
):
file = deployment_yml(
file = deployment_yml( # noqa: F841
"""\
namespace: test
chart: test
Expand Down Expand Up @@ -211,7 +211,7 @@ def test_preserve_empty_environment_variable(
deployment_yml,
confirm_yes,
):
file = deployment_yml(
file = deployment_yml( # noqa: F841
"""\
namespace: test
chart: test
Expand All @@ -226,7 +226,7 @@ def test_preserve_null_environment_variable(
deployment_yml,
confirm_yes,
):
file = deployment_yml(
file = deployment_yml( # noqa: F841
"""\
namespace: test
chart: test
Expand Down

0 comments on commit 5f041cc

Please sign in to comment.