forked from extern/httpie-cli
Cleanup
This commit is contained in:
parent
33422312c5
commit
631e332dad
@ -5,9 +5,8 @@ from tests import TestEnvironment, mk_config_dir, http, httpbin, HTTP_OK
|
|||||||
|
|
||||||
|
|
||||||
class SessionTestBase(object):
|
class SessionTestBase(object):
|
||||||
|
|
||||||
def setup_method(self, method):
|
def setup_method(self, method):
|
||||||
"""Create and a unique config dir for each test."""
|
"""Create and reuse a unique config dir for each test."""
|
||||||
self.config_dir = mk_config_dir()
|
self.config_dir = mk_config_dir()
|
||||||
|
|
||||||
def teardown_method(self, method):
|
def teardown_method(self, method):
|
||||||
@ -27,7 +26,7 @@ class SessionTestBase(object):
|
|||||||
|
|
||||||
class TestSessionFlow(SessionTestBase):
|
class TestSessionFlow(SessionTestBase):
|
||||||
"""
|
"""
|
||||||
These tests, start with an existing session create in setup_method().
|
These tests start with an existing session created in `setup_method()`.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -40,7 +39,7 @@ class TestSessionFlow(SessionTestBase):
|
|||||||
super(TestSessionFlow, self).setup_method(method)
|
super(TestSessionFlow, self).setup_method(method)
|
||||||
r1 = http('--follow', '--session=test', '--auth=username:password',
|
r1 = http('--follow', '--session=test', '--auth=username:password',
|
||||||
'GET', httpbin('/cookies/set?hello=world'), 'Hello:World',
|
'GET', httpbin('/cookies/set?hello=world'), 'Hello:World',
|
||||||
env=self.env())
|
env=self.env())
|
||||||
assert HTTP_OK in r1
|
assert HTTP_OK in r1
|
||||||
|
|
||||||
def test_session_created_and_reused(self):
|
def test_session_created_and_reused(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user