From 8394f6e2d2b564352d7f2f0d482b0d1aca05bc1e Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 15 Sep 2025 19:26:56 -0700 Subject: [PATCH] ugh --- tests/app/organization/test_rest.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/app/organization/test_rest.py b/tests/app/organization/test_rest.py index b53de04c3..461661f42 100644 --- a/tests/app/organization/test_rest.py +++ b/tests/app/organization/test_rest.py @@ -4,7 +4,7 @@ from unittest.mock import Mock import pytest from flask import current_app from freezegun import freeze_time -from hypothesis import Phase, given, settings +from hypothesis import given, settings from hypothesis import strategies as st from sqlalchemy import select from sqlalchemy.exc import SQLAlchemyError @@ -236,8 +236,7 @@ def test_post_create_organization_works(admin_request, sample_organization): assert len(organization) == 2 -settings.register_profile("no_replay", phases=[Phase.explicit, Phase.generate]) -settings.load_profile("no_replay") +seen = set() @pytest.mark.usefixtures( @@ -284,6 +283,12 @@ def test_fuzz_create_org_with_edge_cases(admin_request, notify_db_session): and isinstance(organization_type, OrganizationType) } expected_status = 201 if is_valid else 400 + key = (name, active, organization_type) + if key in seen: + expected_status = 400 + else: + seen.add(key) + response = None try: response = admin_request.post(