|
|
|
@ -157,7 +157,7 @@ def test_fetch_url_nossl(open_url_mock, fake_ansible_module, mocker):
|
|
|
|
|
fetch_url(fake_ansible_module, 'http://ansible.com/')
|
|
|
|
|
|
|
|
|
|
assert 'python-ssl' in excinfo.value.kwargs['msg']
|
|
|
|
|
assert'http://ansible.com/' == excinfo.value.kwargs['url']
|
|
|
|
|
assert 'http://ansible.com/' == excinfo.value.kwargs['url']
|
|
|
|
|
assert excinfo.value.kwargs['status'] == -1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -167,7 +167,7 @@ def test_fetch_url_connectionerror(open_url_mock, fake_ansible_module):
|
|
|
|
|
fetch_url(fake_ansible_module, 'http://ansible.com/')
|
|
|
|
|
|
|
|
|
|
assert excinfo.value.kwargs['msg'] == 'TESTS'
|
|
|
|
|
assert'http://ansible.com/' == excinfo.value.kwargs['url']
|
|
|
|
|
assert 'http://ansible.com/' == excinfo.value.kwargs['url']
|
|
|
|
|
assert excinfo.value.kwargs['status'] == -1
|
|
|
|
|
|
|
|
|
|
open_url_mock.side_effect = ValueError('TESTS')
|
|
|
|
@ -175,7 +175,7 @@ def test_fetch_url_connectionerror(open_url_mock, fake_ansible_module):
|
|
|
|
|
fetch_url(fake_ansible_module, 'http://ansible.com/')
|
|
|
|
|
|
|
|
|
|
assert excinfo.value.kwargs['msg'] == 'TESTS'
|
|
|
|
|
assert'http://ansible.com/' == excinfo.value.kwargs['url']
|
|
|
|
|
assert 'http://ansible.com/' == excinfo.value.kwargs['url']
|
|
|
|
|
assert excinfo.value.kwargs['status'] == -1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|