diff options
author | BonfaceKilz | 2021-05-13 11:16:32 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-05-13 11:18:57 +0300 |
commit | 09f699253400a807e2390e6515b204a1b9f4c3a9 (patch) | |
tree | ed9e9eb8d2760912109ee09cb0a2e80e8de1ecd0 /tests/integration | |
parent | 7ab86429219a2ed5ad7b94f0ce9667dd4c38c56d (diff) | |
download | genenetwork3-09f699253400a807e2390e6515b204a1b9f4c3a9.tar.gz |
tests: test_general: Add test case for run_r_qtl endpoint
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/test_general.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/integration/test_general.py b/tests/integration/test_general.py index 99c4824..8fc2b43 100644 --- a/tests/integration/test_general.py +++ b/tests/integration/test_general.py @@ -46,3 +46,14 @@ class GeneralAPITest(unittest.TestCase): self.assertEqual(response.get_json(), {"status": 128, "error": "gzip failed to unpack file"}) + + @mock.patch("gn3.api.general.run_cmd") + def test_run_r_qtl(self, mock_run_cmd): + """Test correct upload of file""" + mock_run_cmd.return_value = "Random results from STDOUT" + response = self.app.post("/api/qtl/run/" + "geno_file_test/" + "pheno_file_test") + self.assertEqual(response.status_code, 201) + self.assertEqual(response.get_json(), + "Random results from STDOUT") |