From 59e3603a3e93ab814fa28217cb8ee05d30c84ad0 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 5 Apr 2016 20:58:40 +0100 Subject: [PATCH] fix tests --- tests/functional/openlp_core_lib/test_webpagereader.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/functional/openlp_core_lib/test_webpagereader.py b/tests/functional/openlp_core_lib/test_webpagereader.py index 224911ab0..80b2c1f9a 100644 --- a/tests/functional/openlp_core_lib/test_webpagereader.py +++ b/tests/functional/openlp_core_lib/test_webpagereader.py @@ -141,8 +141,8 @@ class TestUtils(TestCase): """ Test that adding a header to the call to get_web_page() adds the header to the request """ - with patch('openlp.core.lib.urllib.request.Request') as MockRequest, \ - patch('openlp.core.lib.urllib.request.urlopen') as mock_urlopen, \ + with patch('openlp.core.lib.webpagereader.urllib.request.Request') as MockRequest, \ + patch('openlp.core.lib.webpagereader.urllib.request.urlopen') as mock_urlopen, \ patch('openlp.core.lib.webpagereader._get_user_agent') as mock_get_user_agent: # GIVEN: Mocked out objects, a fake URL and a fake header mocked_request_object = MagicMock() @@ -170,8 +170,8 @@ class TestUtils(TestCase): """ Test that adding a user agent in the header when calling get_web_page() adds that user agent to the request """ - with patch('openlp.core.lib.urllib.request.Request') as MockRequest, \ - patch('openlp.core.lib.urllib.request.urlopen') as mock_urlopen, \ + with patch('openlp.core.lib.webpagereader.urllib.request.Request') as MockRequest, \ + patch('openlp.core.lib.webpagereader.urllib.request.urlopen') as mock_urlopen, \ patch('openlp.core.lib.webpagereader._get_user_agent') as mock_get_user_agent: # GIVEN: Mocked out objects, a fake URL and a fake header mocked_request_object = MagicMock() @@ -201,7 +201,7 @@ class TestUtils(TestCase): with patch('openlp.core.lib.webpagereader.urllib.request.Request') as MockRequest, \ patch('openlp.core.lib.webpagereader.urllib.request.urlopen') as mock_urlopen, \ patch('openlp.core.lib.webpagereader._get_user_agent') as mock_get_user_agent, \ - patch('openlp.core.lib.Registry') as MockRegistry: + patch('openlp.core.lib.webpagereader.Registry') as MockRegistry: # GIVEN: Mocked out objects, a fake URL mocked_request_object = MagicMock() MockRequest.return_value = mocked_request_object