diff --git a/tests/tests_integration/test_api/test_simulators/test_simulators.py b/tests/tests_integration/test_api/test_simulators/test_simulators.py index 155cbcb5a..911582520 100644 --- a/tests/tests_integration/test_api/test_simulators/test_simulators.py +++ b/tests/tests_integration/test_api/test_simulators/test_simulators.py @@ -42,17 +42,12 @@ def seed_simulator(cognite_client: CogniteClient, seed_resource_names) -> None: simulator_external_id = seed_resource_names["simulator_external_id"] simulators = cognite_client.simulators.list() simulator_exists = len(list(filter(lambda x: x.external_id == simulator_external_id, simulators))) > 0 - if simulator_exists: + if not simulator_exists: cognite_client.post( - f"/api/v1/projects/{cognite_client.config.project}/simulators/delete", - json={"items": [{"externalId": seed_resource_names["simulator_external_id"]}]}, + f"/api/v1/projects/{cognite_client.config.project}/simulators", + json={"items": [simulator]}, ) - cognite_client.post( - f"/api/v1/projects/{cognite_client.config.project}/simulators", - json={"items": [simulator]}, - ) - @pytest.fixture def seed_simulator_integration(cognite_client: CogniteClient, seed_simulator) -> None: