Commit 81a92183 authored by Francisco Arcila Salamanca's avatar Francisco Arcila Salamanca
Browse files

🎉 add end to end importer test 🎉

parent cb13daa5
......@@ -40,7 +40,6 @@ config_dic = {
"user": "root",
"password": "",
"database": "test_main",
"host": "mariadb", # gitignore
"port": 3306,
}
......@@ -165,7 +164,7 @@ class TestUtils(TestCase):
for db in ["test_main", "test_onto", "test_meta", "test_receptors"]:
execute_one_db(config_dic, db)
def test_end(self):
def test_export_end(self):
this_dir, _ = os.path.split(__file__)
test_dir = os.path.join(this_dir, "tmp_path")
......@@ -177,10 +176,15 @@ class TestUtils(TestCase):
assert aex.main() is True
assert equal_dirs(os.path.join(test_dir, "test_main"), test_files) is True
try:
shutil.rmtree(test_dir)
except OSError as e:
print("Error: %s : %s" % (test_dir, e.strerror))
def test_import_end(self):
this_dir, _ = os.path.split(__file__)
test_files = os.path.join(this_dir, "data", "test_data")
self.monkeypatch.setitem(aim.TEST_ARGS, "config_db", config_dic)
self.monkeypatch.setitem(aim.TEST_ARGS, "project_name", "test_main_airr")
self.monkeypatch.setitem(aim.TEST_ARGS, "ssh_group", "test")
self.monkeypatch.setitem(aim.TEST_ARGS, "input_path", test_files)
assert aim.main() is True
# pd.testing.assert_frame_equal(rearrangements_frame, ontologies_df) # todo test
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment