Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoided unneeded assertion on Python 3

Fixes failure introduced in 02e5909.
  • Loading branch information...
commit a8d1421dd9d0ada64b9d8a3e96ed0b431c66ac97 1 parent 02e5909
@claudep claudep authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 django/contrib/auth/tests/basic.py
View
7 django/contrib/auth/tests/basic.py
@@ -13,7 +13,7 @@
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 wrapped(*args):
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):
Please sign in to comment.
Something went wrong with that request. Please try again.