From a8d1421dd9d0ada64b9d8a3e96ed0b431c66ac97 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Fri, 15 Feb 2013 16:09:31 +0100 Subject: [PATCH] Avoided unneeded assertion on Python 3 Fixes failure introduced in 02e5909f7a. --- django/contrib/auth/tests/basic.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/django/contrib/auth/tests/basic.py b/django/contrib/auth/tests/basic.py index 3c7bcffc7d..097bc90451 100644 --- a/django/contrib/auth/tests/basic.py +++ b/django/contrib/auth/tests/basic.py @@ -13,7 +13,7 @@ from django.core.management import call_command from django.test import TestCase from django.test.utils import override_settings from django.utils.encoding import force_str -from django.utils.six import binary_type, StringIO +from django.utils.six import binary_type, PY3, StringIO def mock_inputs(inputs): @@ -26,8 +26,9 @@ def mock_inputs(inputs): class mock_getpass: @staticmethod def getpass(prompt=b'Password: ', stream=None): - # getpass on Windows only supports prompt as bytestring (#19807) - assert isinstance(prompt, binary_type) + if not PY3: + # getpass on Windows only supports prompt as bytestring (#19807) + assert isinstance(prompt, binary_type) return inputs['password'] def mock_input(prompt):