summarylogtreecommitdiffstats
path: root/tests_use_random_ports.patch
blob: c498170cc362e1ced4679b21efa43e15ab293e81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- jupyterhub/tests/mocking.py
+++ jupyterhub/tests/mocking.py

@@ -241,6 +241,8 @@
         if 'internal_certs_location' in kwargs:
             cert_location = kwargs['internal_certs_location']
             kwargs['external_certs'] = ssl_setup(cert_location, 'hub-ca')
+        self.config.JupyterHub.hub_port = random_port()
+        self.config.ConfigurableHTTPProxy.api_url = f'http://127.0.0.1:{random_port()}'
         super().__init__(*args, **kwargs)
 
     @default('subdomain_host')