From 841a91e9504447b6d6dc7f5ec42ab428ccffdb3e Mon Sep 17 00:00:00 2001 From: Asif Saifuddin Auvi Date: Tue, 6 Dec 2016 00:47:58 +0600 Subject: [PATCH] fix authentication_test pytest failure --- tests/test_authentication.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_authentication.py b/tests/test_authentication.py index 21d2583bf..151fabad5 100644 --- a/tests/test_authentication.py +++ b/tests/test_authentication.py @@ -175,7 +175,8 @@ class SessionAuthTests(TestCase): cf. [#1810](https://github.com/tomchristie/django-rest-framework/pull/1810) """ response = self.csrf_client.get('/auth/login/') - assert '' in response + content = response.content.decode('utf8') + assert '' in content def test_post_form_session_auth_failing_csrf(self): """