generated from Luis/nextjs-python-web-template
fixed cors issues
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import random
|
||||
import uuid
|
||||
|
||||
from openapi_client import ApiClient
|
||||
from openapi_client.api import DefaultApi
|
||||
from openapi_client.api.entities_api import EntitiesApi
|
||||
@@ -10,18 +13,11 @@ from openapi_client.models import (
|
||||
Status,
|
||||
)
|
||||
|
||||
uuids = [
|
||||
"e95bb72f-b1b3-4452-8065-c7acf09068fc",
|
||||
"411d772e-1ad0-4d99-8da0-133ab2972322",
|
||||
"8cfdf359-c3b9-4951-9e51-08dce797725a",
|
||||
"24b5b4de-9f5f-4e60-878e-cc5be085fd0d",
|
||||
"d45f9687-c413-43b9-8e0d-cb610b39fcaf",
|
||||
"083e09a0-1d71-4819-83e2-ce2a6d831713",
|
||||
"e6f74e55-c163-4368-98c0-a2b04c99d6e3",
|
||||
"1b577ba7-c9dd-4e66-b695-9350e9db0b6c",
|
||||
"bfd9e653-98a4-4451-9d97-bcc2908f213d",
|
||||
"0e481624-b886-437c-89a0-b9e73651cc72",
|
||||
]
|
||||
random.seed(42)
|
||||
|
||||
|
||||
num_uuids = 100
|
||||
uuids = [str(uuid.UUID(int=random.getrandbits(128))) for i in range(num_uuids)]
|
||||
|
||||
|
||||
def test_health(api_client: ApiClient) -> None:
|
||||
@@ -75,7 +71,8 @@ def test_create_entities(api_client: ApiClient) -> None:
|
||||
def test_create_services(api_client: ApiClient) -> None:
|
||||
sapi = ServicesApi(api_client=api_client)
|
||||
eapi = EntitiesApi(api_client=api_client)
|
||||
for idx, entity in enumerate(eapi.get_all_entities()):
|
||||
service_obj = create_service(idx, entity)
|
||||
service = sapi.create_service(service_obj)
|
||||
assert service.uuid == service_obj.uuid
|
||||
for midx, entity in enumerate(eapi.get_all_entities()):
|
||||
for idx in range(4):
|
||||
service_obj = create_service(idx + 4 * midx, entity)
|
||||
service = sapi.create_service(service_obj)
|
||||
assert service.uuid == service_obj.uuid
|
||||
|
||||
Reference in New Issue
Block a user