-
Bjarke Madsen authoredBjarke Madsen authored
test_junos_devices_query.py 634 B
import os
import responses
from inventory_provider import juniper
TEST_DATA_FILENAME = os.path.realpath(os.path.join(
os.path.dirname(__file__),
'data',
'netdash-alldevices.txt'))
@responses.activate
def test_junosspace_devices_parsing(data_config):
data_config['managed-routers'] = 'http://sabababa'
with open(TEST_DATA_FILENAME) as f:
responses.add(
method=responses.GET,
url=data_config['managed-routers'],
body=f.read())
hostnames = juniper.load_routers_from_netdash(
data_config['managed-routers'])
assert 'mx1.ams.nl.geant.net' in hostnames