diff options
| author | Gregory Oschwald <goschwald@maxmind.com> | 2013-05-06 10:18:26 -0700 |
|---|---|---|
| committer | Gregory Oschwald <goschwald@maxmind.com> | 2013-05-06 10:18:26 -0700 |
| commit | aef80904fe976c56c68c31db35f39b8c1803f687 (patch) | |
| tree | 48b68b7aaeee29da9630fd8703b6a771885edad2 /tests/functional | |
| parent | 42aa501c3cc5870a08db6fb734688485a876f94e (diff) | |
| download | httpretty-aef80904fe976c56c68c31db35f39b8c1803f687.tar.gz | |
Whitespace and 'u' string fixes
Diffstat (limited to 'tests/functional')
| -rw-r--r-- | tests/functional/test_bypass.py | 6 | ||||
| -rw-r--r-- | tests/functional/test_debug.py | 12 | ||||
| -rw-r--r-- | tests/functional/test_httplib2.py | 24 | ||||
| -rw-r--r-- | tests/functional/test_requests.py | 40 | ||||
| -rw-r--r-- | tests/functional/test_urllib2.py | 24 |
5 files changed, 53 insertions, 53 deletions
diff --git a/tests/functional/test_bypass.py b/tests/functional/test_bypass.py index e5704fb..2973141 100644 --- a/tests/functional/test_bypass.py +++ b/tests/functional/test_bypass.py @@ -64,7 +64,7 @@ def stop_tcp_server(context): @httpretty.activate @that_with_context(start_http_server, stop_http_server) def test_httpretty_bypasses_when_disabled(context): - "httpretty should bypass all requests by disabling it" + "httpretty should bypass all requests by disabling it" httpretty.register_uri( httpretty.GET, "http://localhost:9999/go-for-bubbles/", @@ -97,7 +97,7 @@ def test_httpretty_bypasses_when_disabled(context): @httpretty.activate @that_with_context(start_http_server, stop_http_server) def test_httpretty_bypasses_a_unregistered_request(context): - "httpretty should bypass a unregistered request by disabling it" + "httpretty should bypass a unregistered request by disabling it" httpretty.register_uri( httpretty.GET, "http://localhost:9999/go-for-bubbles/", @@ -119,7 +119,7 @@ def test_httpretty_bypasses_a_unregistered_request(context): @httpretty.activate @that_with_context(start_tcp_server, stop_tcp_server) def test_using_httpretty_with_other_tcp_protocols(context): - "httpretty should work even when testing code that also use other TCP-based protocols" + "httpretty should work even when testing code that also use other TCP-based protocols" httpretty.register_uri( httpretty.GET, "http://falcao.it/foo/", diff --git a/tests/functional/test_debug.py b/tests/functional/test_debug.py index 9872530..ff22fec 100644 --- a/tests/functional/test_debug.py +++ b/tests/functional/test_debug.py @@ -41,7 +41,7 @@ def create_socket(context): @httprettified @scenario(create_socket) def test_httpretty_debugs_socket_send(context): - "HTTPretty should debug socket.send" + "HTTPretty should debug socket.send" expect(context.sock.send).when.called.to.throw( RuntimeError, @@ -52,7 +52,7 @@ def test_httpretty_debugs_socket_send(context): @httprettified @scenario(create_socket) def test_httpretty_debugs_socket_sendto(context): - "HTTPretty should debug socket.sendto" + "HTTPretty should debug socket.sendto" expect(context.sock.sendto).when.called.to.throw( RuntimeError, @@ -63,7 +63,7 @@ def test_httpretty_debugs_socket_sendto(context): @httprettified @scenario(create_socket) def test_httpretty_debugs_socket_recv(context): - "HTTPretty should debug socket.recv" + "HTTPretty should debug socket.recv" expect(context.sock.recv).when.called.to.throw( RuntimeError, @@ -74,7 +74,7 @@ def test_httpretty_debugs_socket_recv(context): @httprettified @scenario(create_socket) def test_httpretty_debugs_socket_recvfrom(context): - "HTTPretty should debug socket.recvfrom" + "HTTPretty should debug socket.recvfrom" expect(context.sock.recvfrom).when.called.to.throw( RuntimeError, @@ -85,7 +85,7 @@ def test_httpretty_debugs_socket_recvfrom(context): @httprettified @scenario(create_socket) def test_httpretty_debugs_socket_recv_into(context): - "HTTPretty should debug socket.recv_into" + "HTTPretty should debug socket.recv_into" expect(context.sock.recv_into).when.called.to.throw( RuntimeError, @@ -96,7 +96,7 @@ def test_httpretty_debugs_socket_recv_into(context): @httprettified @scenario(create_socket) def test_httpretty_debugs_socket_recvfrom_into(context): - "HTTPretty should debug socket.recvfrom_into" + "HTTPretty should debug socket.recvfrom_into" expect(context.sock.recvfrom_into).when.called.to.throw( RuntimeError, diff --git a/tests/functional/test_httplib2.py b/tests/functional/test_httplib2.py index a13801a..11baedc 100644 --- a/tests/functional/test_httplib2.py +++ b/tests/functional/test_httplib2.py @@ -36,7 +36,7 @@ from httpretty.core import decode_utf8 @httprettified @within(two=microseconds) def test_httpretty_should_mock_a_simple_get_with_httplib2_read(now): - "HTTPretty should mock a simple GET with httplib2.context.http" + "HTTPretty should mock a simple GET with httplib2.context.http" HTTPretty.register_uri(HTTPretty.GET, "http://yipit.com/", body="Find the best daily deals") @@ -51,7 +51,7 @@ def test_httpretty_should_mock_a_simple_get_with_httplib2_read(now): @httprettified @within(two=microseconds) def test_httpretty_provides_easy_access_to_querystrings(now): - "HTTPretty should provide an easy access to the querystring" + "HTTPretty should provide an easy access to the querystring" HTTPretty.register_uri(HTTPretty.GET, "http://yipit.com/", body="Find the best daily deals") @@ -67,7 +67,7 @@ def test_httpretty_provides_easy_access_to_querystrings(now): @httprettified @within(two=microseconds) def test_httpretty_should_mock_headers_httplib2(now): - "HTTPretty should mock basic headers with httplib2" + "HTTPretty should mock basic headers with httplib2" HTTPretty.register_uri(HTTPretty.GET, "http://github.com/", body="this is supposed to be the response", @@ -88,7 +88,7 @@ def test_httpretty_should_mock_headers_httplib2(now): @httprettified @within(two=microseconds) def test_httpretty_should_allow_adding_and_overwritting_httplib2(now): - "HTTPretty should allow adding and overwritting headers with httplib2" + "HTTPretty should allow adding and overwritting headers with httplib2" HTTPretty.register_uri(HTTPretty.GET, "http://github.com/foo", body="this is supposed to be the response", @@ -114,7 +114,7 @@ def test_httpretty_should_allow_adding_and_overwritting_httplib2(now): @httprettified @within(two=microseconds) def test_httpretty_should_allow_forcing_headers_httplib2(now): - "HTTPretty should allow forcing headers with httplib2" + "HTTPretty should allow forcing headers with httplib2" HTTPretty.register_uri(HTTPretty.GET, "http://github.com/foo", body="this is supposed to be the response", @@ -138,7 +138,7 @@ def test_httpretty_should_allow_forcing_headers_httplib2(now): @httprettified @within(two=microseconds) def test_httpretty_should_allow_adding_and_overwritting_by_kwargs_u2(now): - "HTTPretty should allow adding and overwritting headers by keyword args " \ + "HTTPretty should allow adding and overwritting headers by keyword args " \ "with httplib2" HTTPretty.register_uri(HTTPretty.GET, "http://github.com/foo", @@ -167,7 +167,7 @@ def test_httpretty_should_allow_adding_and_overwritting_by_kwargs_u2(now): @httprettified @within(two=microseconds) def test_rotating_responses_with_httplib2(now): - "HTTPretty should support rotating responses with httplib2" + "HTTPretty should support rotating responses with httplib2" HTTPretty.register_uri( HTTPretty.GET, "https://api.yahoo.com/test", @@ -198,7 +198,7 @@ def test_rotating_responses_with_httplib2(now): @httprettified @within(two=microseconds) def test_can_inspect_last_request(now): - "HTTPretty.last_request is a mimetools.Message request from last match" + "HTTPretty.last_request is a mimetools.Message request from last match" HTTPretty.register_uri(HTTPretty.POST, "http://api.github.com/", body='{"repositories": ["HTTPretty", "lettuce"]}') @@ -224,7 +224,7 @@ def test_can_inspect_last_request(now): @httprettified @within(two=microseconds) def test_can_inspect_last_request_with_ssl(now): - "HTTPretty.last_request is recorded even when mocking 'https' (SSL)" + "HTTPretty.last_request is recorded even when mocking 'https' (SSL)" HTTPretty.register_uri(HTTPretty.POST, "https://secure.github.com/", body='{"repositories": ["HTTPretty", "lettuce"]}') @@ -250,7 +250,7 @@ def test_can_inspect_last_request_with_ssl(now): @httprettified @within(two=microseconds) def test_httpretty_ignores_querystrings_from_registered_uri(now): - "Registering URIs with query string cause them to be ignored" + "Registering URIs with query string cause them to be ignored" HTTPretty.register_uri(HTTPretty.GET, "http://yipit.com/?id=123", body="Find the best daily deals") @@ -265,7 +265,7 @@ def test_httpretty_ignores_querystrings_from_registered_uri(now): @httprettified @within(two=microseconds) def test_callback_response(now): - (u"HTTPretty should all a callback function to be set as the body with" + ("HTTPretty should all a callback function to be set as the body with" " httplib2") def request_callback(request, uri, headers): @@ -292,7 +292,7 @@ def test_callback_response(now): @httprettified def test_httpretty_should_allow_registering_regexes(): - "HTTPretty should allow registering regexes with httplib2" + "HTTPretty should allow registering regexes with httplib2" HTTPretty.register_uri( HTTPretty.GET, diff --git a/tests/functional/test_requests.py b/tests/functional/test_requests.py index 11b43c6..7cb407f 100644 --- a/tests/functional/test_requests.py +++ b/tests/functional/test_requests.py @@ -50,7 +50,7 @@ next = advance_iterator @httprettified @within(two=microseconds) def test_httpretty_should_mock_a_simple_get_with_requests_read(now): - "HTTPretty should mock a simple GET with requests.get" + "HTTPretty should mock a simple GET with requests.get" HTTPretty.register_uri(HTTPretty.GET, "http://yipit.com/", body="Find the best daily deals") @@ -64,7 +64,7 @@ def test_httpretty_should_mock_a_simple_get_with_requests_read(now): @httprettified @within(two=microseconds) def test_httpretty_provides_easy_access_to_querystrings(now): - "HTTPretty should provide an easy access to the querystring" + "HTTPretty should provide an easy access to the querystring" HTTPretty.register_uri(HTTPretty.GET, "http://yipit.com/", body="Find the best daily deals") @@ -79,7 +79,7 @@ def test_httpretty_provides_easy_access_to_querystrings(now): @httprettified @within(two=microseconds) def test_httpretty_should_mock_headers_requests(now): - "HTTPretty should mock basic headers with requests" + "HTTPretty should mock basic headers with requests" HTTPretty.register_uri(HTTPretty.GET, "http://github.com/", body="this is supposed to be the response", @@ -101,7 +101,7 @@ def test_httpretty_should_mock_headers_requests(now): @httprettified @within(two=microseconds) def test_httpretty_should_allow_adding_and_overwritting_requests(now): - "HTTPretty should allow adding and overwritting headers with requests" + "HTTPretty should allow adding and overwritting headers with requests" HTTPretty.register_uri(HTTPretty.GET, "http://github.com/foo", body="this is supposed to be the response", @@ -126,7 +126,7 @@ def test_httpretty_should_allow_adding_and_overwritting_requests(now): @httprettified @within(two=microseconds) def test_httpretty_should_allow_forcing_headers_requests(now): - "HTTPretty should allow forcing headers with requests" + "HTTPretty should allow forcing headers with requests" HTTPretty.register_uri(HTTPretty.GET, "http://github.com/foo", body="<root><baz /</root>", @@ -146,7 +146,7 @@ def test_httpretty_should_allow_forcing_headers_requests(now): @httprettified @within(two=microseconds) def test_httpretty_should_allow_adding_and_overwritting_by_kwargs_u2(now): - "HTTPretty should allow adding and overwritting headers by keyword args " \ + "HTTPretty should allow adding and overwritting headers by keyword args " \ "with requests" HTTPretty.register_uri(HTTPretty.GET, "http://github.com/foo", @@ -170,7 +170,7 @@ def test_httpretty_should_allow_adding_and_overwritting_by_kwargs_u2(now): @httprettified @within(two=microseconds) def test_rotating_responses_with_requests(now): - "HTTPretty should support rotating responses with requests" + "HTTPretty should support rotating responses with requests" HTTPretty.register_uri( HTTPretty.GET, "https://api.yahoo.com/test", @@ -201,7 +201,7 @@ def test_rotating_responses_with_requests(now): @httprettified @within(two=microseconds) def test_can_inspect_last_request(now): - "HTTPretty.last_request is a mimetools.Message request from last match" + "HTTPretty.last_request is a mimetools.Message request from last match" HTTPretty.register_uri(HTTPretty.POST, "http://api.github.com/", body='{"repositories": ["HTTPretty", "lettuce"]}') @@ -227,7 +227,7 @@ def test_can_inspect_last_request(now): @httprettified @within(two=microseconds) def test_can_inspect_last_request_with_ssl(now): - "HTTPretty.last_request is recorded even when mocking 'https' (SSL)" + "HTTPretty.last_request is recorded even when mocking 'https' (SSL)" HTTPretty.register_uri(HTTPretty.POST, "https://secure.github.com/", body='{"repositories": ["HTTPretty", "lettuce"]}') @@ -253,7 +253,7 @@ def test_can_inspect_last_request_with_ssl(now): @httprettified @within(two=microseconds) def test_httpretty_ignores_querystrings_from_registered_uri(now): - "HTTPretty should ignore querystrings from the registered uri (requests library)" + "HTTPretty should ignore querystrings from the registered uri (requests library)" HTTPretty.register_uri(HTTPretty.GET, "http://yipit.com/?id=123", body=b"Find the best daily deals") @@ -392,7 +392,7 @@ def test_multipart(): @httprettified @within(two=microseconds) def test_callback_response(now): - (u"HTTPretty should call a callback function and set its return value as the body of the response" + ("HTTPretty should call a callback function and set its return value as the body of the response" " requests") def request_callback(request, uri, headers): @@ -420,7 +420,7 @@ def test_callback_response(now): @httprettified @within(two=microseconds) def test_callback_body_remains_callable_for_any_subsequent_requests(now): - (u"HTTPretty should call a callback function more than one" + ("HTTPretty should call a callback function more than one" " requests") def request_callback(request, uri, headers): @@ -439,7 +439,7 @@ def test_callback_body_remains_callable_for_any_subsequent_requests(now): @httprettified @within(two=microseconds) def test_callback_setting_headers_and_status_response(now): - (u"HTTPretty should call a callback function and uses it retur tuple as status code, headers and body" + ("HTTPretty should call a callback function and uses it retur tuple as status code, headers and body" " requests") def request_callback(request, uri, headers): @@ -470,7 +470,7 @@ def test_callback_setting_headers_and_status_response(now): @httprettified def test_httpretty_should_allow_registering_regexes_and_give_a_proper_match_to_the_callback(): - "HTTPretty should allow registering regexes with requests and giva a proper match to the callback" + "HTTPretty should allow registering regexes with requests and giva a proper match to the callback" HTTPretty.register_uri( HTTPretty.GET, @@ -486,7 +486,7 @@ def test_httpretty_should_allow_registering_regexes_and_give_a_proper_match_to_t @httprettified def test_httpretty_should_allow_registering_regexes(): - "HTTPretty should allow registering regexes with requests" + "HTTPretty should allow registering regexes with requests" HTTPretty.register_uri( HTTPretty.GET, @@ -503,7 +503,7 @@ def test_httpretty_should_allow_registering_regexes(): @httprettified def test_httpretty_provides_easy_access_to_querystrings_with_regexes(): - "HTTPretty should match regexes even if they have a different querystring" + "HTTPretty should match regexes even if they have a different querystring" HTTPretty.register_uri( HTTPretty.GET, @@ -521,7 +521,7 @@ def test_httpretty_provides_easy_access_to_querystrings_with_regexes(): @httprettified def test_httpretty_should_allow_multiple_methods_for_the_same_uri(): - "HTTPretty should allow registering multiple methods for the same uri" + "HTTPretty should allow registering multiple methods for the same uri" url = 'http://test.com/test' methods = ['GET', 'POST', 'PUT'] @@ -546,7 +546,7 @@ def my_callback(request, url, headers): @httprettified def test_httpretty_should_allow_registering_regexes_with_streaming_responses(): - "HTTPretty should allow registering regexes with requests" + "HTTPretty should allow registering regexes with requests" HTTPretty.register_uri( HTTPretty.POST, @@ -576,7 +576,7 @@ def test_httpretty_should_allow_registering_regexes_with_streaming_responses(): @httprettified def test_httpretty_should_allow_multiple_responses_with_multiple_methods(): - "HTTPretty should allow multiple responses when binding multiple methods to the same uri" + "HTTPretty should allow multiple responses when binding multiple methods to the same uri" url = 'http://test.com/list' @@ -608,7 +608,7 @@ def test_httpretty_should_allow_multiple_responses_with_multiple_methods(): @httprettified def test_httpretty_should_normalize_url_patching(): - "HTTPretty should normalize all url patching" + "HTTPretty should normalize all url patching" HTTPretty.register_uri( HTTPretty.GET, diff --git a/tests/functional/test_urllib2.py b/tests/functional/test_urllib2.py index 5e4647a..cb84f00 100644 --- a/tests/functional/test_urllib2.py +++ b/tests/functional/test_urllib2.py @@ -41,7 +41,7 @@ from httpretty.core import decode_utf8 @httprettified @within(two=microseconds) def test_httpretty_should_mock_a_simple_get_with_urllib2_read(): - "HTTPretty should mock a simple GET with urllib2.read()" + "HTTPretty should mock a simple GET with urllib2.read()" HTTPretty.register_uri(HTTPretty.GET, "http://yipit.com/", body="Find the best daily deals") @@ -56,7 +56,7 @@ def test_httpretty_should_mock_a_simple_get_with_urllib2_read(): @httprettified @within(two=microseconds) def test_httpretty_provides_easy_access_to_querystrings(now): - "HTTPretty should provide an easy access to the querystring" + "HTTPretty should provide an easy access to the querystring" HTTPretty.register_uri(HTTPretty.GET, "http://yipit.com/", body="Find the best daily deals") @@ -74,7 +74,7 @@ def test_httpretty_provides_easy_access_to_querystrings(now): @httprettified @within(two=microseconds) def test_httpretty_should_mock_headers_urllib2(now): - "HTTPretty should mock basic headers with urllib2" + "HTTPretty should mock basic headers with urllib2" HTTPretty.register_uri(HTTPretty.GET, "http://github.com/", body="this is supposed to be the response", @@ -99,7 +99,7 @@ def test_httpretty_should_mock_headers_urllib2(now): @httprettified @within(two=microseconds) def test_httpretty_should_allow_adding_and_overwritting_urllib2(now): - "HTTPretty should allow adding and overwritting headers with urllib2" + "HTTPretty should allow adding and overwritting headers with urllib2" HTTPretty.register_uri(HTTPretty.GET, "http://github.com/", body="this is supposed to be the response", @@ -127,7 +127,7 @@ def test_httpretty_should_allow_adding_and_overwritting_urllib2(now): @httprettified @within(two=microseconds) def test_httpretty_should_allow_forcing_headers_urllib2(): - "HTTPretty should allow forcing headers with urllib2" + "HTTPretty should allow forcing headers with urllib2" HTTPretty.register_uri(HTTPretty.GET, "http://github.com/", body="this is supposed to be the response", @@ -147,7 +147,7 @@ def test_httpretty_should_allow_forcing_headers_urllib2(): @httprettified @within(two=microseconds) def test_httpretty_should_allow_adding_and_overwritting_by_kwargs_u2(now): - "HTTPretty should allow adding and overwritting headers by " \ + "HTTPretty should allow adding and overwritting headers by " \ "keyword args with urllib2" body = "this is supposed to be the response, indeed" @@ -175,7 +175,7 @@ def test_httpretty_should_allow_adding_and_overwritting_by_kwargs_u2(now): @httprettified @within(two=microseconds) def test_httpretty_should_support_a_list_of_successive_responses_urllib2(now): - "HTTPretty should support adding a list of successive " \ + "HTTPretty should support adding a list of successive " \ "responses with urllib2" HTTPretty.register_uri( @@ -208,7 +208,7 @@ def test_httpretty_should_support_a_list_of_successive_responses_urllib2(now): @httprettified @within(two=microseconds) def test_can_inspect_last_request(now): - "HTTPretty.last_request is a mimetools.Message request from last match" + "HTTPretty.last_request is a mimetools.Message request from last match" HTTPretty.register_uri(HTTPretty.POST, "http://api.github.com/", body='{"repositories": ["HTTPretty", "lettuce"]}') @@ -237,7 +237,7 @@ def test_can_inspect_last_request(now): @httprettified @within(two=microseconds) def test_can_inspect_last_request_with_ssl(now): - "HTTPretty.last_request is recorded even when mocking 'https' (SSL)" + "HTTPretty.last_request is recorded even when mocking 'https' (SSL)" HTTPretty.register_uri(HTTPretty.POST, "https://secure.github.com/", body='{"repositories": ["HTTPretty", "lettuce"]}') @@ -266,7 +266,7 @@ def test_can_inspect_last_request_with_ssl(now): @httprettified @within(two=microseconds) def test_httpretty_ignores_querystrings_from_registered_uri(): - "HTTPretty should mock a simple GET with urllib2.read()" + "HTTPretty should mock a simple GET with urllib2.read()" HTTPretty.register_uri(HTTPretty.GET, "http://yipit.com/?id=123", body="Find the best daily deals") @@ -283,7 +283,7 @@ def test_httpretty_ignores_querystrings_from_registered_uri(): @httprettified @within(two=microseconds) def test_callback_response(now): - (u"HTTPretty should all a callback function to be set as the body with" + ("HTTPretty should all a callback function to be set as the body with" " urllib2") def request_callback(request, uri, headers): @@ -319,7 +319,7 @@ def test_callback_response(now): @httprettified def test_httpretty_should_allow_registering_regexes(): - "HTTPretty should allow registering regexes with urllib2" + "HTTPretty should allow registering regexes with urllib2" HTTPretty.register_uri( HTTPretty.GET, |
