diff --git a/tests/test_access/tst_access_drogon_manage_login.py b/tests/test_access/tst_access_drogon_manage_login.py index 0da6b415..0c89b42e 100644 --- a/tests/test_access/tst_access_drogon_manage_login.py +++ b/tests/test_access/tst_access_drogon_manage_login.py @@ -101,7 +101,12 @@ def test_aggregations_bulk(explorer: Explorer): cases = explorer.cases print("Number of cases: ", len(cases)) assert len(cases) > 0 - case = cases[0] + case = None + for c in cases: + if len(c.iterations) > 0 and len(c.surfaces) > 40: + case = c + break + assert case case_uuid = case.metadata.get("fmu").get("case").get("uuid") print("About to trigger aggregation on case", case_uuid) body = { @@ -121,10 +126,15 @@ def test_aggregations_fast(explorer: Explorer): cases = explorer.cases print("Number of cases: ", len(cases)) assert len(cases) > 0 - case = cases[0] + case = None + for c in cases: + if len(c.iterations) > 0 and len(c.surfaces) > 40: + case = c + break + assert case case_uuid = case.metadata.get("fmu").get("case").get("uuid") print("About to trigger fast-aggregation on case", case_uuid) - surface_uuid = cases[0].surfaces[0].uuid + surface_uuid = case.surfaces[0].uuid print("using object_id of first surface:", surface_uuid) body = { "operations": ["min"], diff --git a/tests/test_access/tst_access_drogon_read_login.py b/tests/test_access/tst_access_drogon_read_login.py index 744801ae..ed87f363 100644 --- a/tests/test_access/tst_access_drogon_read_login.py +++ b/tests/test_access/tst_access_drogon_read_login.py @@ -101,9 +101,14 @@ def test_aggregations_fast(explorer: Explorer): cases = explorer.cases print("Number of cases: ", len(cases)) assert len(cases) > 0 - case = cases[0] + case = None + for c in cases: + if len(c.iterations) > 0 and len(c.surfaces) > 40: + case = c + break + assert case case_uuid = case.metadata.get("fmu").get("case").get("uuid") - surface_uuid = cases[0].surfaces[0].uuid + surface_uuid = case.surfaces[0].uuid print("using object_id of first surface:", surface_uuid) body = { "operations": ["min"], @@ -126,7 +131,12 @@ def test_aggregate_bulk(explorer: Explorer): cases = explorer.cases print("Number of cases: ", len(cases)) assert len(cases) > 0 - case = cases[0] + case = None + for c in cases: + if len(c.iterations) > 0 and len(c.surfaces) > 40: + case = c + break + assert case case_uuid = case.metadata.get("fmu").get("case").get("uuid") body = { "operations": ["min"], diff --git a/tests/test_access/tst_access_drogon_write_login.py b/tests/test_access/tst_access_drogon_write_login.py index 5e39f4b7..8e222569 100644 --- a/tests/test_access/tst_access_drogon_write_login.py +++ b/tests/test_access/tst_access_drogon_write_login.py @@ -101,7 +101,12 @@ def test_aggregate_bulk(explorer: Explorer): cases = explorer.cases print("Number of cases: ", len(cases)) assert len(cases) > 0 - case = cases[0] + case = None + for c in cases: + if len(c.iterations) > 0 and len(c.surfaces) > 40: + case = c + break + assert case case_uuid = case.metadata.get("fmu").get("case").get("uuid") print("About to trigger aggregation on case", case_uuid) body = { @@ -121,10 +126,15 @@ def test_aggregations_fast(explorer: Explorer): cases = explorer.cases print("Number of cases: ", len(cases)) assert len(cases) > 0 - case = cases[0] + case = None + for c in cases: + if len(c.iterations) > 0 and len(c.surfaces) > 40: + case = c + break + assert case case_uuid = case.metadata.get("fmu").get("case").get("uuid") print("About to trigger fast-aggregation on case", case_uuid) - surface_uuid = cases[0].surfaces[0].uuid + surface_uuid = case.surfaces[0].uuid print("using object_id of first surface:", surface_uuid) body = { "operations": ["min"],