Mock server: use 127.0.0.1 also for HTTPS

Windows throws an error about 0.0.0.0 being external:
https://stackoverflow.com/a/23857995/939364
This commit is contained in:
Adrián Chaves 2020-04-16 15:36:56 +02:00
parent 2f510fd47d
commit 94ee68695a
1 changed files with 2 additions and 3 deletions

View File

@ -218,9 +218,8 @@ class MockServer():
self.proc.communicate()
def url(self, path, is_secure=False):
host = self.http_address.replace('0.0.0.0', '127.0.0.1')
if is_secure:
host = self.https_address
host = self.https_address if is_secure else self.http_address
host = host.replace('0.0.0.0', '127.0.0.1')
return host + path