diff options
| author | Gabriel Falcao <gabriel@nacaolivre.org> | 2013-03-12 12:59:30 -0400 |
|---|---|---|
| committer | Gabriel Falcao <gabriel@nacaolivre.org> | 2013-03-12 13:00:32 -0400 |
| commit | f6ad4601c1de871acf198acc833e8dcfc5df5afb (patch) | |
| tree | 0443d67def6eb3647330ef26710e58b667f8a361 /tests/unit | |
| parent | 82cd65860bdad8635e2fc8651484dccad91aea03 (diff) | |
| download | httpretty-f6ad4601c1de871acf198acc833e8dcfc5df5afb.tar.gz | |
global state
Diffstat (limited to 'tests/unit')
| -rw-r--r-- | tests/unit/test_httpretty.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/tests/unit/test_httpretty.py b/tests/unit/test_httpretty.py index d8e2170..49d3877 100644 --- a/tests/unit/test_httpretty.py +++ b/tests/unit/test_httpretty.py @@ -139,17 +139,24 @@ def test_status_codes(): def test_uri_info_full_url(): uri_info = URIInfo( - username='johhny', - password='password', - hostname=b'google.com', - port=80, - path=b'/', - query=b'foo=bar&baz=test', - fragment='', - scheme='', - ) + username='johhny', + password='password', + hostname=b'google.com', + port=80, + path=b'/', + query=b'foo=bar&baz=test', + fragment='', + scheme='', + ) expect(uri_info.full_url()).to.equal( "http://johhny:password@google.com/?foo=bar&baz=test" ) + +def test_global_boolean_enabled(): + expect(HTTPretty.is_enabled()).to.be.falsy + HTTPretty.enable() + expect(HTTPretty.is_enabled()).to.be.truthy + HTTPretty.disable() + expect(HTTPretty.is_enabled()).to.be.falsy |
