swadhinbiswas

[email protected]
2026-07-29 17:23:37 +0600 committed NaN years ago
bbe85fc
commit bbe85fc
3 files changed
+3 -23
▼crates/justapi-py/tests/test_circuit_breaker_new.py
+1-8
2
2
from urllib.error import HTTPError
3
3
import multiprocessing
4
4
import time
5
-import socket
6
5
from justapi import JustAPIApp
7
6
8
-# Use dynamic port to avoid conflicts
9
-def get_free_port():
10
- with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
11
- s.bind(('', 0))
12
- return s.getsockname()[1]
13
-
14
-PORT = get_free_port()
7
+PORT = 18088
15
8
16
9
def run_server():
17
10
app = JustAPIApp()
18
11
▼crates/justapi-py/tests/test_query.py
+1-7
9
9
10
10
from justapi import JustAPIApp
11
11
12
-# Use dynamic port to avoid conflicts
13
-def get_free_port():
14
- with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
15
- s.bind(('', 0))
16
- return s.getsockname()[1]
17
-
18
-PORT = get_free_port()
12
+PORT = 18095
19
13
20
14
21
15
def run_server():
22
16
▼crates/justapi-py/tests/test_ws_sse.py
+1-8
2
2
3
3
import multiprocessing
4
4
import time
5
-import socket
6
5
7
6
import pytest
8
7
import requests
16
15
WEBSOCKETS_AVAILABLE = False
17
16
18
17
19
-# Use dynamic port to avoid conflicts
20
-def get_free_port():
21
- with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
22
- s.bind(('', 0))
23
- return s.getsockname()[1]
24
-
25
-PORT = get_free_port()
18
+PORT = 18091
26
19
27
20
28
21
def run_server():
29
22