Skip to content

Commit

Permalink
Add integration test-case for install tool dependency API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Nov 27, 2016
1 parent 40a95a3 commit e905b8b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/integration/test_resolvers.py
Expand Up @@ -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')

Expand Down Expand Up @@ -82,3 +83,15 @@ def test_dependency_status_installed_not_exact( self ):
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 )

0 comments on commit e905b8b

Please sign in to comment.