Decode gearman function into utf
Previously the test was trying to cast the binary string into a string which in python3 still returns a binary string. As such the following startswith would not match as it was doing b'merger:cat'.startswith('merger:'). Fix the test by decoding into UTF-8 Change-Id: I794af9f88dcdf0b697249a8e372ad08d6b154315
This commit is contained in:
parent
f0f68098fe
commit
e508880579
|
@ -166,7 +166,7 @@ class TestScheduler(ZuulTestCase):
|
|||
"Test the correct variant of a job runs on a branch"
|
||||
self._startMerger()
|
||||
for f in list(self.executor_server.merger_worker.functions.keys()):
|
||||
f = str(f)
|
||||
f = f.decode('utf8')
|
||||
if f.startswith('merger:'):
|
||||
self.executor_server.merger_worker.unRegisterFunction(f)
|
||||
|
||||
|
|
Loading…
Reference in New Issue