From fb645b0e415797d8cc713b8b1bd291995bdbcd90 Mon Sep 17 00:00:00 2001 From: Vedant P Iyer Date: Mon, 4 Nov 2024 18:01:23 -0700 Subject: [PATCH] Updated erd test to use yaml and toml test files --- dsi/tests/test_plugin.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dsi/tests/test_plugin.py b/dsi/tests/test_plugin.py index 5a92bbf..5d3c7d0 100644 --- a/dsi/tests/test_plugin.py +++ b/dsi/tests/test_plugin.py @@ -8,13 +8,11 @@ def test_export_db_erd(): a=Terminal(debug_flag=False) - a.load_module('backend','SqliteReader','back-read', filename='data/data.db') - a.artifact_handler(interaction_type="read") - a.load_module('plugin', 'ER_Diagram', 'writer', filename = 'erd_test_output.png')#, target_table_prefix = "physics") + a.load_module('plugin', 'Schema', 'reader', filename="examples/data/example_schema.json" , target_table_prefix = "student") + a.load_module('plugin', 'YAML', 'reader', filenames=["examples/data/student_test1.yml", "examples/data/student_test2.yml"], target_table_prefix = "student") + a.load_module('plugin', 'TOML', 'reader', filenames=["examples/data/results.toml"], target_table_prefix = "results") + a.load_module('plugin', 'ER_Diagram', 'writer', filename = 'erd_test_output.png') a.transload() - # subprocess.run(["sqlite3", "erd_test.db"], stdin= open("examples/data/erd_test.sql", "r")) - # fw.ER_Diagram("erd_test.db").export_erd("erd_test.db", "erd_test_output") - # os.remove("erd_test.db") er_image = cv2.imread("erd_test_output.png") assert er_image is not None #check if image generated at all