From eb389b77b7793dce27a16086217a6412e4eb5055 Mon Sep 17 00:00:00 2001 From: Erik Reid <erik.reid@geant.org> Date: Thu, 16 Jan 2020 10:19:10 +0100 Subject: [PATCH] removed unecessary mock --- test/test_celery_worker_global.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/test/test_celery_worker_global.py b/test/test_celery_worker_global.py index 1d9a0b9c..da360070 100644 --- a/test/test_celery_worker_global.py +++ b/test/test_celery_worker_global.py @@ -2,13 +2,10 @@ just checks that the worker methods call the right functions and some data ends up in the right place ... otherwise not very detailed """ -import contextlib import os from inventory_provider.tasks import worker from inventory_provider.tasks import common - - from inventory_provider.tasks.common import _get_redis @@ -22,19 +19,11 @@ def backend_db(): }).db -@contextlib.contextmanager -def _mocked_connection(x): - yield x - - def test_update_locations(mocker, mocked_worker_module, mocked_redis): mocker.patch( 'inventory_provider.db.opsdb.lookup_pop_info', lambda c, h: [{'C': c, 'H': h}]) - mocker.patch( - 'inventory_provider.db.db.connection', - _mocked_connection) def _cached_locations(): db = backend_db() -- GitLab