diff --git a/ckanext/baepublisher/tests/test_store_connector.py b/ckanext/baepublisher/tests/test_store_connector.py index d8dca0d..db32ce5 100644 --- a/ckanext/baepublisher/tests/test_store_connector.py +++ b/ckanext/baepublisher/tests/test_store_connector.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2015 - 2017 Conwet Lab., Universidad Politécnica de Madrid +# Copyright (C) 2015 - 2018 Conwet Lab., Universidad Politécnica de Madrid # This file is part of CKAN Store Publisher Extension. @@ -234,9 +234,9 @@ def refresh_function_side_effect(): # If the first request returns a 401, the request is retried with a new access_token... if response_status != 401: self.assertEquals(first_response, result) - req_method.assert_called_once_with(url, headers=expected_headers, json=data) + req_method.assert_called_once_with(url, headers=expected_headers, json=data, verify=True) store_connector.OAuth2Session.assert_called_once_with(token=usertoken) - req_method.assert_called_once_with(url, headers=expected_headers, json=data) + req_method.assert_called_once_with(url, headers=expected_headers, json=data, verify=True) else: # Check that the token has been refreshed store_connector.plugins.toolkit.c.usertoken_refresh.assert_called_once_with() diff --git a/ckanext/baepublisher/tests/test_ui_controller.py b/ckanext/baepublisher/tests/test_ui_controller.py index 69a1006..805fa9b 100644 --- a/ckanext/baepublisher/tests/test_ui_controller.py +++ b/ckanext/baepublisher/tests/test_ui_controller.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2014 - 2017 CoNWeT Lab., Universidad Politécnica de Madrid +# Copyright (c) 2014 - 2018 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of CKAN Store Publisher Extension. @@ -118,7 +118,7 @@ def test_get_content(self, content, resp, filters): requests.get.assert_called_once_with( '{0}/DSProductCatalog/api/catalogManagement/v2/{1}'.format( self._store_connector_instance.store_url, content), - params=filters) + params=filters, verify=True) if content == 'category' or content == 'catalog': self.assertEquals(r, {'id': '1'}) diff --git a/test.ini b/test.ini index bc806db..7b65165 100644 --- a/test.ini +++ b/test.ini @@ -1,2 +1,4 @@ [app:main] -use = config:./ckan/test-core.ini \ No newline at end of file +use = config:./ckan/test-core.ini + +ckan.baepublisher.store_url = http://teststore.com