Skip to content
Snippets Groups Projects
Commit ef664df2 authored by Erik Reid's avatar Erik Reid
Browse files

pep8

parent 34a30945
No related branches found
No related tags found
No related merge requests found
......@@ -128,16 +128,6 @@ class MockedRedis(object):
def keys(self, glob=None):
return list(self.scan_iter(glob))
def keys(self, glob=None):
if not glob:
return list([k.encode("utf-8") for k in MockedRedis.db.keys()])
m = re.match(r'^([^*]+)\*$', glob)
assert m # all expected global are like this
return list([
k.encode("utf-8") for k in MockedRedis.db.keys()
if k.startswith(m.group(1))])
def flushdb(self):
# only called from testing routes (hopefully)
pass
......@@ -221,6 +211,7 @@ def mocked_netifaces(mocker):
mocker.patch('netifaces.interfaces', lambda: data.keys())
mocker.patch('netifaces.ifaddresses', lambda n: data[n])
@pytest.fixture
def mocked_worker_module(
mocker, mocked_redis, data_config,
......
......@@ -22,6 +22,7 @@ def classifier_cache_test_entries():
with open(filename) as f:
return json.loads(f.read())
def pytest_generate_tests(metafunc):
def _junosspace_hosts():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment