Skip to content

Commit

Permalink
Avoided unneeded assertion on Python 3
Browse files Browse the repository at this point in the history
Fixes failure introduced in 02e5909.
  • Loading branch information
claudep committed Feb 15, 2013
1 parent 02e5909 commit a8d1421
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions django/contrib/auth/tests/basic.py
Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit a8d1421

Please sign in to comment.