py3 fixes for watch-tasks unit tests
This commit is contained in:
parent
704e542b65
commit
d38a2f30da
2 changed files with 5 additions and 5 deletions
|
|
@ -22,7 +22,7 @@ class BaseFakeClientSession(koji.ClientSession):
|
|||
try:
|
||||
result = self._callMethod(method, args, kwargs)
|
||||
ret.append(result)
|
||||
except Fault, fault:
|
||||
except Fault as fault:
|
||||
if strict:
|
||||
raise
|
||||
else:
|
||||
|
|
@ -114,12 +114,12 @@ class RecordingClientSession(BaseFakeClientSession):
|
|||
kwargs, retry)
|
||||
call['result'] = result
|
||||
return result
|
||||
except Fault, fault:
|
||||
except Fault as fault:
|
||||
err = {'faultCode': fault.faultCode,
|
||||
'faultString': fault.faultString}
|
||||
call['fault'] = err
|
||||
raise
|
||||
except koji.GenericError, e:
|
||||
except koji.GenericError as e:
|
||||
err = {'faultCode': e.faultCode,
|
||||
'faultString': str(e)}
|
||||
call['fault'] = err
|
||||
|
|
|
|||
|
|
@ -111,11 +111,11 @@ class TestWatchTasks(unittest.TestCase):
|
|||
1208 build (f24, /users/mikem/fake.git:master): free -> open (builder-01)
|
||||
1209 buildSRPMFromSCM (/users/mikem/fake.git:master): free
|
||||
1209 buildSRPMFromSCM (/users/mikem/fake.git:master): free -> open (builder-01)
|
||||
Tasks still running. You can continue to watch with the 'nosetests watch-task' command.
|
||||
Tasks still running. You can continue to watch with the '%s watch-task' command.
|
||||
Running Tasks:
|
||||
1208 build (f24, /users/mikem/fake.git:master): open (builder-01)
|
||||
1209 buildSRPMFromSCM (/users/mikem/fake.git:master): open (builder-01)
|
||||
''')
|
||||
''' % (os.path.basename(sys.argv[0]) or 'koji'))
|
||||
self.assertMultiLineEqual(stdout.getvalue(), expected)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue