diff --git a/data_setup.py b/data_setup.py index ffb31e3..4cd465a 100644 --- a/data_setup.py +++ b/data_setup.py @@ -1,7 +1,6 @@ from sqlalchemy import Column, create_engine, ForeignKey, insert, Integer, MetaData, Table -engine = create_engine("sqlite+pysqlite:///:memory:", echo=True) -def setup_data(engine=engine): +def setup_data(engine): metadata_object = MetaData() table_a = Table( "table_a", diff --git a/integration_test.py b/integration_test.py new file mode 100644 index 0000000..542bf05 --- /dev/null +++ b/integration_test.py @@ -0,0 +1,18 @@ +from unittest import TestCase + +from data_setup import setup_data + +from graph import get_graph + +from sqlalchemy import create_engine, text + +from plot_graph import plot + +engine = create_engine("sqlite+pysqlite:///:memory:", echo=True) + +class DataSetupTests(TestCase): + def test_integration(self): + setup_data(engine) + graph = get_graph( engine, 'table_a', 1 ) + plot(graph) + diff --git a/test_data_setup.py b/test_data_setup.py index ab1d5f7..9080045 100644 --- a/test_data_setup.py +++ b/test_data_setup.py @@ -26,5 +26,5 @@ def test_has_some_data(self): class PlotlyFunctionsTests(TestCase): - def basic_test(self): - basic_test() \ No newline at end of file + def test_basic(self): + basic_test()