aboutsummaryrefslogtreecommitdiff
path: root/tests/integration/test_datasets.py
diff options
context:
space:
mode:
authorAlexander Kabui2021-04-04 13:33:34 +0300
committerAlexander Kabui2021-04-04 13:33:34 +0300
commit2301b11e8a975f2e6dc7e5144e4b26c34b186501 (patch)
tree3e6815b89bd92fba3be0d339d0205a62f0772616 /tests/integration/test_datasets.py
parent3dd25f77952f4829af5c19a0b40d221df308a185 (diff)
downloadgenenetwork3-2301b11e8a975f2e6dc7e5144e4b26c34b186501.tar.gz
refactor code for trait data
modify unittest and integration tests for datasets
Diffstat (limited to 'tests/integration/test_datasets.py')
-rw-r--r--tests/integration/test_datasets.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/integration/test_datasets.py b/tests/integration/test_datasets.py
index cb08ad1..1d72234 100644
--- a/tests/integration/test_datasets.py
+++ b/tests/integration/test_datasets.py
@@ -27,11 +27,13 @@ class DatasetIntegrationTests(TestCase):
self.assertEqual(results[1], "ProbeSet")
self.assertEqual(response.status_code, 200)
- def test_fetch_traits_data(self):
+ @mock.patch("gn3.api.datasets.get_traits_data")
+ def test_fetch_traits_data(self, mock_get_trait_data):
"""test api/dataset/fetch_traits_data/d_name/d_type"""
+ mock_get_trait_data.return_value = {}
response = self.app.get(
"/api/dataset/fetch_traits_data/Aging-Brain-UCIPublish/Publish")
self.assertEqual(response.status_code, 200)
- self.assertEqual(response.get_json(), {})
+ self.assertEqual(response.get_json(), {"results": {}})