mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-21 19:50:40 +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
|
||||
def autostop():
|
||||
def autostop(mocker):
|
||||
mocker.patch.object(
|
||||
Autostop.AutoStop,
|
||||
"_get_docker_client",
|
||||
return_value=mocker.create_autospec(docker.APIClient)
|
||||
)
|
||||
|
||||
stop = Autostop.AutoStop()
|
||||
return stop
|
||||
|
||||
|
@ -12,7 +12,13 @@ pytest_plugins = [
|
||||
|
||||
|
||||
@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()
|
||||
return gc
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user