From d7317160ecccd969a8984619120509d247dc0e2b Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 15 Sep 2025 18:25:51 -0700 Subject: [PATCH] ugh --- tests/app/organization/test_rest.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/app/organization/test_rest.py b/tests/app/organization/test_rest.py index e70e0be98..c79d31022 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 HealthCheck, Phase, given, settings from hypothesis import strategies as st from sqlalchemy import select from sqlalchemy.exc import SQLAlchemyError @@ -246,7 +246,16 @@ def test_fuzz_create_org_with_edge_cases( admin_request, ): - @settings(max_examples=100, database=None, phases=[Phase.generate]) + # We want to avoid replays, because once an organization is created, replaying will result in a + # duplicate error on our side. Unfortunately, to avoid replays in hypothesis is hard! + # Tell it not to use its database, use Phase.generate, and set report_multiple_bugs=False + @settings( + max_examples=100, + database=None, + phases=[Phase.generate], + suppress_health_check=[HealthCheck.too_slow], + report_multiple_bugs=False, + ) @given( name=st.uuids().map(str), active=st.booleans(),