mirror of
https://github.com/django/django.git
synced 2025-09-27 12:39:17 +00:00
Avoided unneeded assertion on Python 3
Fixes failure introduced in 02e5909f7a
.
This commit is contained in:
parent
02e5909f7a
commit
a8d1421dd9
1 changed files with 4 additions and 3 deletions
|
@ -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,6 +26,7 @@ def mock_inputs(inputs):
|
|||
class mock_getpass:
|
||||
@staticmethod
|
||||
def getpass(prompt=b'Password: ', stream=None):
|
||||
if not PY3:
|
||||
# getpass on Windows only supports prompt as bytestring (#19807)
|
||||
assert isinstance(prompt, binary_type)
|
||||
return inputs['password']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue