mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[FIX] conftest: local webhook support
Not sure how I missed this but apparently pytest fixtures can't return or yield, it's one or the other. Which makes a lot of sense but means the tunnel fixture was broken when using local webhooks (= no tunnel) as it returned the local url rather than yield it.
This commit is contained in:
parent
fffc27d2fa
commit
6281c86d5e
@ -184,7 +184,7 @@ def tunnel(pytestconfig, port):
|
||||
"""
|
||||
tunnel = pytestconfig.getoption('--tunnel')
|
||||
if tunnel == '':
|
||||
return f'http://localhost:{port}'
|
||||
yield f'http://localhost:{port}'
|
||||
elif tunnel == 'ngrok':
|
||||
web_addr = 'http://localhost:4040/api'
|
||||
addr = 'localhost:%d' % port
|
||||
|
Loading…
Reference in New Issue
Block a user