Skip to content

Commit

Permalink
Updated erd test to use yaml and toml test files
Browse files Browse the repository at this point in the history
  • Loading branch information
Vedant P Iyer committed Nov 5, 2024
1 parent 0fee897 commit fb645b0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dsi/tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb645b0

Please sign in to comment.