-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathtest_utils.py
36 lines (30 loc) · 964 Bytes
/
test_utils.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import json
from collections import namedtuple
import pytest
from arize.utils import utils
def test_response_url():
input = namedtuple("Response", ["content"])(
json.dumps(
{
"realTimeIngestionUri": (
"https://app.dev.arize.com/"
"organizations/test-hmac-org/"
"spaces/test-hmac-space/"
"models/modelName/"
"z-upload-classification-data-with-arize?"
"selectedTab=overview"
)
}
).encode()
)
expected = (
"https://app.dev.arize.com/"
"organizations/test-hmac-org/"
"spaces/test-hmac-space/models/"
"modelName/"
"z-upload-classification-data-with-arize?"
"selectedTab=overview"
)
assert utils.reconstruct_url(input) == expected
if __name__ == "__main__":
raise SystemExit(pytest.main([__file__]))