mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-28 23:20:36 +00:00
patch _get_docker_client in testfiles
This commit is contained in:
parent
5768351773
commit
dc1760b12c
@ -11,7 +11,13 @@ pytest_plugins = [
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def autostop():
|
def autostop(mocker):
|
||||||
|
mocker.patch.object(
|
||||||
|
Autostop.AutoStop,
|
||||||
|
"_get_docker_client",
|
||||||
|
return_value=mocker.create_autospec(docker.APIClient)
|
||||||
|
)
|
||||||
|
|
||||||
stop = Autostop.AutoStop()
|
stop = Autostop.AutoStop()
|
||||||
return stop
|
return stop
|
||||||
|
|
||||||
|
@ -12,7 +12,13 @@ pytest_plugins = [
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def gc():
|
def gc(mocker):
|
||||||
|
mocker.patch.object(
|
||||||
|
GarbageCollector.GarbageCollector,
|
||||||
|
"_get_docker_client",
|
||||||
|
return_value=mocker.create_autospec(docker.APIClient)
|
||||||
|
)
|
||||||
|
|
||||||
gc = GarbageCollector.GarbageCollector()
|
gc = GarbageCollector.GarbageCollector()
|
||||||
return gc
|
return gc
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user