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

added pass criteria for juniper hostname derivation

parent 3c9b9ad0
Branches
Tags
No related merge requests found
......@@ -35,11 +35,20 @@ def test_junosspace_devices_parsing(data_config):
def test_router_hostname_derivation(mocked_redis):
"""
test result depends specifically on the test data set containing
a realistic snapshot
:param mocked_redis:
:return:
"""
config = {
'redis': {
'hostname': None,
'port': None
}
}
for hostname in worker._derive_router_hostnames(config):
assert re.match('^mx[\d].+\.geant\.net$', hostname)
hostnames = list(worker._derive_router_hostnames(config))
assert hostnames # test data is non-empty
for h in hostnames:
assert re.match(r'^mx[12].+\.geant\.net$', h)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment