fix 2.x isms in distutils test
This commit is contained in:
parent
d148630e72
commit
467a7bd282
|
@ -150,7 +150,7 @@ We need to know who you are, so please choose either:
|
||||||
3. have the server generate a new password for you (and email it to you), or
|
3. have the server generate a new password for you (and email it to you), or
|
||||||
4. quit
|
4. quit
|
||||||
Your selection [default 1]: ''', log.INFO)
|
Your selection [default 1]: ''', log.INFO)
|
||||||
choice = raw_input()
|
choice = input()
|
||||||
if not choice:
|
if not choice:
|
||||||
choice = '1'
|
choice = '1'
|
||||||
elif choice not in choices:
|
elif choice not in choices:
|
||||||
|
|
|
@ -60,7 +60,7 @@ class registerTestCase(PyPIRCCommandTestCase):
|
||||||
# Save your login (y/N)? : 'y'
|
# Save your login (y/N)? : 'y'
|
||||||
inputs = RawInputs('1', 'tarek', 'y')
|
inputs = RawInputs('1', 'tarek', 'y')
|
||||||
from distutils.command import register as register_module
|
from distutils.command import register as register_module
|
||||||
register_module.raw_input = inputs.__call__
|
register_module.input = inputs.__call__
|
||||||
def _getpass(prompt):
|
def _getpass(prompt):
|
||||||
return 'xxx'
|
return 'xxx'
|
||||||
register_module.getpass.getpass = _getpass
|
register_module.getpass.getpass = _getpass
|
||||||
|
@ -71,8 +71,7 @@ class registerTestCase(PyPIRCCommandTestCase):
|
||||||
def __call__(self, *args):
|
def __call__(self, *args):
|
||||||
# we want to compare them, so let's store
|
# we want to compare them, so let's store
|
||||||
# something comparable
|
# something comparable
|
||||||
els = args[0].items()
|
els = sorted(args[0].items())
|
||||||
els.sort()
|
|
||||||
self.calls.append(tuple(els))
|
self.calls.append(tuple(els))
|
||||||
return 200, 'OK'
|
return 200, 'OK'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue