Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

722 B
Raw Blame
import httpx

from services.billing_client import saas
from tests.unit_tests.services.billing_client.conftest import RespondWith


def test_path_params_are_percent_encoded_and_body_uses_wire_names(respond_with: RespondWith) -> None:
    requests = respond_with(httpx.Response(200, json={"success": True}))

    reply = saas.notification_dismiss_notification(
        notification_id="a/b c", body=saas.DismissNotificationReq(notification_id="a/b c", account_id="acc")
    )

    assert reply.success is True
    assert str(requests[0].url) == "http://billing/v1/notifications/a%2Fb%20c/dismiss"
    assert requests[0].url.raw_path == b"/v1/notifications/a%2Fb%20c/dismiss"
    assert b'"accountId"' in requests[0].content