From cc7cd47ef54a09efbf8272d1e024f6f2ac92594b Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 27 Nov 2016 17:49:59 +0100 Subject: [PATCH] Add integration test-case for install tool dependency API endpoint --- test/integration/test_resolvers.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/integration/test_resolvers.py b/test/integration/test_resolvers.py index f1ee7d9b8eb..cf8993f0e8a 100644 --- a/test/integration/test_resolvers.py +++ b/test/integration/test_resolvers.py @@ -17,6 +17,7 @@ class CondaResolutionIntegrationTestCase(integration_util.IntegrationTestCase, A @classmethod def handle_galaxy_config_kwds(cls, config): cls.conda_tmp_prefix = mkdtemp() + config["use_cached_dep_manager"] = True config["conda_auto_init"] = True config["conda_prefix"] = os.path.join(cls.conda_tmp_prefix, 'conda') @@ -82,3 +83,15 @@ class CondaResolutionIntegrationTestCase(integration_util.IntegrationTestCase, A self._assert_status_code_is( create_response, 200 ) response = create_response.json() assert response['dependency_type'] == 'conda' and not response['exact'] + + def test_conda_install_through_tools_api( self ): + tool_id = 'mulled_example_multi_1' + endpoint = "tools/%s/install_dependencies" % tool_id + data = {'id': tool_id} + create_response = self._post(endpoint, data=data, admin=True) + self._assert_status_code_is( create_response, 200 ) + response = create_response.json() + assert any([True for d in response if d['dependency_type'] == 'conda']) + endpoint = "tools/%s/build_dependency_cache" % tool_id + create_response = self._post(endpoint, data=data, admin=True) + self._assert_status_code_is( create_response, 200 )