mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-24 16:23:44 -04:00
ugh
This commit is contained in:
@@ -4,7 +4,7 @@ from unittest.mock import Mock
|
|||||||
import pytest
|
import pytest
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
from freezegun import freeze_time
|
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 hypothesis import strategies as st
|
||||||
from sqlalchemy import select
|
from sqlalchemy import select
|
||||||
from sqlalchemy.exc import SQLAlchemyError
|
from sqlalchemy.exc import SQLAlchemyError
|
||||||
@@ -246,7 +246,16 @@ def test_fuzz_create_org_with_edge_cases(
|
|||||||
admin_request,
|
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(
|
@given(
|
||||||
name=st.uuids().map(str),
|
name=st.uuids().map(str),
|
||||||
active=st.booleans(),
|
active=st.booleans(),
|
||||||
|
|||||||
Reference in New Issue
Block a user