From fed0af116b67be8ee7cf817b3f156ae505cf2186 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 15 Sep 2025 10:13:49 -0700 Subject: [PATCH] debug --- tests/app/organization/test_rest.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/app/organization/test_rest.py b/tests/app/organization/test_rest.py index 02a1259ca..e1958e452 100644 --- a/tests/app/organization/test_rest.py +++ b/tests/app/organization/test_rest.py @@ -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