diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 9637d261..b9673490 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -1,7 +1,10 @@ +#!/usr/bin/env python3 +# Copyright 2022 Canonical Ltd. + import os -from lightkube import Client, KubeConfig import pytest +from lightkube import Client, KubeConfig KUBECONFIG = os.environ.get("TESTING_KUBECONFIG", "~/.kube/config") diff --git a/tests/integration/test_charm.py b/tests/integration/test_charm.py index 49276413..72869465 100644 --- a/tests/integration/test_charm.py +++ b/tests/integration/test_charm.py @@ -9,9 +9,9 @@ import pytest import requests import yaml -from pytest_operator.plugin import OpsTest from lightkube import Client from lightkube.resources.networking_v1 import NetworkPolicy +from pytest_operator.plugin import OpsTest logger = logging.getLogger(__name__) diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 70f4b0fc..19c4fb32 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -17,7 +17,7 @@ @pytest.fixture(autouse=True) def lk_client(mocker): - return mocker.patch("charm.Client", autospec=True) + return mocker.patch("k8s_network_policies.Client", autospec=True) @pytest.fixture()