From bc64d7c7337a3d7d5f580942f45a92ab2f638132 Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Sun, 23 Dec 2018 15:15:24 +0100
Subject: [PATCH] updated module & file names

---
 test/data/update_netconf_config_schema.py |  2 +-
 test/test_netconf_data.py                 | 13 ++++++-------
 test/test_netconf_parsing.py              |  3 +--
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/test/data/update_netconf_config_schema.py b/test/data/update_netconf_config_schema.py
index 0e4b4e99..3a6cd094 100644
--- a/test/data/update_netconf_config_schema.py
+++ b/test/data/update_netconf_config_schema.py
@@ -23,5 +23,5 @@ if __name__ == "__main__":
 
     OUTPUT_DIRNAME = os.path.dirname(__file__)
     schema_doc = load_config_schema(hostname, params['ssh'])
-    with open(os.path.join(OUTPUT_DIRNAME, 'netconf-config-schema.xml'), 'w') as f:
+    with open(os.path.join(OUTPUT_DIRNAME, 'juniper-netconf.xsd'), 'w') as f:
         f.write(etree.tostring(schema_doc, pretty_print=True).decode('utf-8'))
\ No newline at end of file
diff --git a/test/test_netconf_data.py b/test/test_netconf_data.py
index 88d3613f..6a20a272 100644
--- a/test/test_netconf_data.py
+++ b/test/test_netconf_data.py
@@ -23,14 +23,13 @@ class MockedJunosDevice(object):
         pass
 
 
-def test_nr1(mocker, data_config):
+def test_query_doc_and_validate(mocker, data_config):
     mocker.patch(
-        'inventory_provider.pyez_test.Device',
-        # 'inventory_provider.pyez_test.jnpr.junos.Device',
+        'inventory_provider.netconf.Device',
         MockedJunosDevice)
 
-    import json
+    etree.parse(SCHEMA_FILENAME)
     for r in data_config['routers']:
-        print(r['hostname'])
-        x = netconf.load_interfaces(r['hostname'], data_config['ssh'])
-        print(json.dumps(list(x), indent=4))
+        doc = netconf.load_config(r['hostname'], data_config['ssh'])
+
+
diff --git a/test/test_netconf_parsing.py b/test/test_netconf_parsing.py
index 88d3613f..804d550b 100644
--- a/test/test_netconf_parsing.py
+++ b/test/test_netconf_parsing.py
@@ -25,8 +25,7 @@ class MockedJunosDevice(object):
 
 def test_nr1(mocker, data_config):
     mocker.patch(
-        'inventory_provider.pyez_test.Device',
-        # 'inventory_provider.pyez_test.jnpr.junos.Device',
+        'inventory_provider.netconf.Device',
         MockedJunosDevice)
 
     import json
-- 
GitLab