diff --git a/test/test_celery_worker_global.py b/test/test_celery_worker_global.py index a67d07c47665ca9f97f0a51f4654103b34574fda..1d9a0b9c126bf077ddca48542b01c45d00ff9e34 100644 --- a/test/test_celery_worker_global.py +++ b/test/test_celery_worker_global.py @@ -58,6 +58,12 @@ def test_InventoryTask_obj(data_config_filename): def test_next_redis(data_config, mocked_redis): + """ + not a very meaningful test ... basically only for sanity & coverage + :param data_config: + :param mocked_redis: + :return: + """ common.set_latch(data_config, 10, 20) r = common.get_next_redis(data_config) assert r @@ -69,6 +75,12 @@ def test_next_redis(data_config, mocked_redis): def test_next_redis_with_none(data_config, mocked_redis): + """ + not a very meaningful test ... basically only for sanity & coverage + :param data_config: + :param mocked_redis: + :return: + """ r = common._get_redis(data_config) assert r diff --git a/test/test_testing_routes.py b/test/test_testing_routes.py index 17a910a26342ff826ff556a75fe3481953f464e3..045a60681298dd1d9e90e6aae0d93ac1f0ffd19c 100644 --- a/test/test_testing_routes.py +++ b/test/test_testing_routes.py @@ -28,7 +28,7 @@ def test_juniper_addresses(client): assert len(response_data) > 0 # test data is not empty -def test_get_equipment_location(client): +def test_get_equipment_location_all(client): rv = client.get( '/testing/opsdb/equipment-location', headers=DEFAULT_REQUEST_HEADERS) @@ -81,3 +81,12 @@ def test_get_parents(client): assert rv.status_code == 200 assert rv.is_json # TODO: validate against schema + + +def test_get_equipment_location(client): + rv = client.get( + '/testing/opsdb/equipment-location/mx1.ams.nl.geant.net', + headers=DEFAULT_REQUEST_HEADERS) + assert rv.status_code == 200 + assert rv.is_json + # TODO: validate against schema