about summary refs log tree commit diff
path: root/tests/integration
diff options
context:
space:
mode:
authorAlexander Kabui2021-05-15 01:20:46 +0300
committerGitHub2021-05-15 01:20:46 +0300
commitc69b11cffba7547d65ac9812b0118cddad91be0d (patch)
treebfa55c23f702db5072e8839e44961dd72fd4a9e2 /tests/integration
parentbcba700bd2835f0a36042d781860b3407519f6d8 (diff)
parent46a96ec0b89620eed4874ada565a9643ac19a042 (diff)
downloadgenenetwork3-c69b11cffba7547d65ac9812b0118cddad91be0d.tar.gz
Merge branch 'main' into feature/minor-fixes
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/test_general.py11
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")