This commit is contained in:
Kenneth Kehl
2025-09-15 18:25:51 -07:00
parent ad164ca499
commit d7317160ec

View File

@@ -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(),