mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-31 11:28:30 -04:00
debug
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import json
|
||||
import uuid
|
||||
from unittest.mock import Mock
|
||||
|
||||
import pytest
|
||||
from flask import current_app
|
||||
from freezegun import freeze_time
|
||||
from hypothesis import given
|
||||
from hypothesis import strategies as st
|
||||
@@ -266,16 +264,19 @@ def test_fuzz_create_org_with_edge_cases(
|
||||
"active": active,
|
||||
"organization_type": org_type_serialized,
|
||||
}
|
||||
current_app.logger.info(f"DATA IS A {type(data)}")
|
||||
current_app.logger.info(f"ORG TYPE IS A {type(org_type_serialized)}")
|
||||
|
||||
try:
|
||||
json.dumps(data)
|
||||
except TypeError as e:
|
||||
pytest.fail(f"Test generated non-serializable data: {data} {e}")
|
||||
is_valid = {
|
||||
isinstance(name, str)
|
||||
and name.strip() != ""
|
||||
and isinstance(organization_type, OrganizationType)
|
||||
and isinstance(active, bool)
|
||||
}
|
||||
expected_status = 201 if is_valid else 400
|
||||
try:
|
||||
response = admin_request.post(
|
||||
"organization.create_organization", _data=data, _expected_status=None
|
||||
"organization.create_organization",
|
||||
_data=data,
|
||||
_expected_status=expected_status,
|
||||
)
|
||||
if (
|
||||
name
|
||||
|
||||
Reference in New Issue
Block a user