from inventory_provider.routes.classifier import get_top_level_services from inventory_provider.tasks import common # todo - not too keen on this as it relies on the extracted opsdb data, which # could change and lead to this test failing def test_get_top_level_circuits(mocked_redis): config = { 'redis-databases': 'xxx', 'redis': { 'hostname': 'host', 'port': 1234 } } r = common.get_current_redis(config) tls = get_top_level_services(47141, r) assert len(tls) == 1 assert tls[0]['name'] == 'LON2-PAR 300G TRUNK'