import httpx from faker import Faker from owsclient.test import OwsClientMock from app.adapters.ows_notifications import OwsNotificationsClient def test_notify_audience_file_exported( ows_notifications_client: OwsNotificationsClient, ows_client_mock: OwsClientMock, faker: Faker, ) -> None: identity_id = "ab11-cd22-ef33" audience_name = "test audience" filename = "zip/test.zip" password = faker.pystr() ows_client_mock.post( "ows-notifications", "/audience/audience-file-exported", json={ "identity_id": identity_id, "audience_name": audience_name, "filename": filename, "password": password, }, ).mock(return_value=httpx.Response(status_code=200)) ows_notifications_client.notify_audience_file_exported( identity_id=identity_id, audience_name=audience_name, filename=filename, password=password, )