mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 21:10:13 +03:00
added more content decode
This commit is contained in:
parent
dac21ab7dc
commit
daf3f56218
|
@ -26,16 +26,19 @@ class DropdownWithAuthTests(TestCase):
|
|||
def test_name_shown_when_logged_in(self):
|
||||
self.client.login(username=self.username, password=self.password)
|
||||
response = self.client.get('/')
|
||||
assert 'john' in response
|
||||
content = response.content.decode('utf8')
|
||||
assert 'john' in content
|
||||
|
||||
def test_logout_shown_when_logged_in(self):
|
||||
self.client.login(username=self.username, password=self.password)
|
||||
response = self.client.get('/')
|
||||
assert '>Log out<' in response
|
||||
content = response.content.decode('utf8')
|
||||
assert '>Log out<' in content
|
||||
|
||||
def test_login_shown_when_logged_out(self):
|
||||
response = self.client.get('/')
|
||||
assert '>Log in<' in response
|
||||
content = response.content.decode('utf8')
|
||||
assert '>Log in<' in content
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF='tests.browsable_api.no_auth_urls')
|
||||
|
|
Loading…
Reference in New Issue
Block a user