From 00c771cc49946d8d16389528138c0839c28a1545 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 11 Sep 2025 13:21:55 -0700 Subject: [PATCH] add another test --- tests/app/conftest.py | 2 +- tests/app/service/test_rest.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/app/conftest.py b/tests/app/conftest.py index fa17f3fd3..b074ec7f9 100644 --- a/tests/app/conftest.py +++ b/tests/app/conftest.py @@ -216,7 +216,7 @@ def sample_sms_code(notify_db_session): return code -@pytest.fixture(scope="function") +@pytest.fixture(scope="session") def sample_service(sample_user): service_name = "Sample service" email_from = service_name.lower().replace(" ", ".") diff --git a/tests/app/service/test_rest.py b/tests/app/service/test_rest.py index b3b4b34c3..7f138c286 100644 --- a/tests/app/service/test_rest.py +++ b/tests/app/service/test_rest.py @@ -3134,12 +3134,12 @@ def test_update_service_sms_sender(client, notify_db_session): assert not resp_json["is_default"] -@pytest.mark.usefixtures("client") +@pytest.mark.usefixtures("client", "sample_service") @settings(max_examples=10) @pytest.mark.parametrize("client", [True], indirect=True) @given(sms_sender=st.text(min_size=0, max_size=50), is_default=st.booleans()) -def test_fuzz_update_service_sms_sender(client, sms_sender, is_default): - service = create_service() +def test_fuzz_update_service_sms_sender(client, sms_sender, is_default, sample_service): + service = sample_service service_sms_sender = create_service_sms_sender( service=service, sms_sender="1235", is_default=False )