From e95824afb5cb83bd269e607565ea26e60b314c08 Mon Sep 17 00:00:00 2001
From: Robert Latta <robert.latta@geant.org>
Date: Mon, 21 Oct 2019 10:42:54 +0000
Subject: [PATCH] updated coriant test - still need to add mocking for '
 _get_top_level_services'

---
 test/test_classifier_routes.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/test/test_classifier_routes.py b/test/test_classifier_routes.py
index 013aa6ce..92c418fc 100644
--- a/test/test_classifier_routes.py
+++ b/test/test_classifier_routes.py
@@ -282,13 +282,13 @@ def test_peer_not_found(client):
     assert rv.status_code == 404
 
 
-@pytest.mark.parametrize('equipment,entity_name,card_id,port_number', [
-    ('grv3.ams.nl.geant.net', '1-1.3.1-100GbE-ODU4-TTP1', '1-1', '3'),
-    ('bogus-hostname.with&special.char',
+@pytest.mark.parametrize('id_,equipment,entity_name,card_id,port_number', [
+    ('123', 'grv3.ams.nl.geant.net', '1-1.3.1-100GbE-ODU4-TTP1', '1-1', '3'),
+    ('123', 'bogus-hostname.with&special.char',
      '234-2345234.7878i234crazynamewithslash/1-2.3', '234-2345234', '7878')
 ])
 def test_coriant_info(
-        client, mocker, equipment, entity_name, card_id, port_number):
+        client, mocker, id_, equipment, entity_name, card_id, port_number):
     """
     just check that entity_name is correctly parsed and the correct
     method is called, but mock out all sql access
@@ -303,7 +303,7 @@ def test_coriant_info(
         'inventory_provider.db.db.connection', mocked_connection)
     mocker.patch(
         'inventory_provider.db.opsdb.lookup_coriant_path',
-        lambda a, b, c, d: {'C': a, 'E': b, 'CID': c, 'P': d})
+        lambda a, b, c, d: {'id': '123', 'C': a, 'E': b, 'CID': c, 'P': d})
 
     rv = client.get(
         '/classifier/coriant-info/{equipment}/{entity}'.format(
@@ -320,6 +320,7 @@ def test_coriant_info(
         'card id': card_id,
         'port number': port_number,
         'path': {
+            'id': id_,
             'C': CONNECTION,
             'E': equipment,
             'CID': card_id,
-- 
GitLab