mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-13 11:22:14 +02:00
fix: scope workflow run to org rather than user
This commit is contained in:
parent
4989bab1e9
commit
43737c67dc
29 changed files with 218 additions and 158 deletions
|
|
@ -94,7 +94,6 @@ async def test_agent_stream_reads_call_metadata_from_start_message():
|
|||
websocket,
|
||||
organization_id=44,
|
||||
workflow_id=101,
|
||||
user_id=202,
|
||||
workflow_run_id=303,
|
||||
params={},
|
||||
)
|
||||
|
|
@ -267,7 +266,6 @@ async def test_agent_stream_handshake_timeout_closes_socket(monkeypatch):
|
|||
websocket,
|
||||
organization_id=1,
|
||||
workflow_id=2,
|
||||
user_id=3,
|
||||
workflow_run_id=4,
|
||||
params={},
|
||||
),
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@ async def test_plivo_xml_route_accepts_valid_signature_with_extra_query_param():
|
|||
provider = _provider()
|
||||
query = {
|
||||
"workflow_id": 7,
|
||||
"user_id": 8,
|
||||
"workflow_run_id": 123,
|
||||
"campaign_id": 42,
|
||||
"organization_id": 11,
|
||||
|
|
@ -138,14 +137,13 @@ async def test_plivo_xml_route_accepts_valid_signature_with_extra_query_param():
|
|||
|
||||
response = await handle_plivo_xml_webhook(
|
||||
workflow_id=7,
|
||||
user_id=8,
|
||||
workflow_run_id=123,
|
||||
organization_id=11,
|
||||
request=request,
|
||||
)
|
||||
|
||||
assert response.body == b"<Response/>"
|
||||
get_webhook_response.assert_awaited_once_with(7, 8, 123)
|
||||
get_webhook_response.assert_awaited_once_with(7, 11, 123)
|
||||
db_client.update_workflow_run.assert_awaited_once()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,6 @@ async def test_twiml_route_accepts_valid_signature_with_extra_query_param():
|
|||
provider = _provider()
|
||||
query = {
|
||||
"workflow_id": 7,
|
||||
"user_id": 8,
|
||||
"workflow_run_id": 123,
|
||||
"campaign_id": 42,
|
||||
"organization_id": 11,
|
||||
|
|
@ -149,14 +148,13 @@ async def test_twiml_route_accepts_valid_signature_with_extra_query_param():
|
|||
|
||||
response = await handle_twiml_webhook(
|
||||
workflow_id=7,
|
||||
user_id=8,
|
||||
workflow_run_id=123,
|
||||
organization_id=11,
|
||||
request=request,
|
||||
)
|
||||
|
||||
assert response.body == b"<Response/>"
|
||||
get_webhook_response.assert_awaited_once_with(7, 8, 123)
|
||||
get_webhook_response.assert_awaited_once_with(7, 11, 123)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
@ -166,7 +164,6 @@ async def test_twiml_route_rejects_missing_signature():
|
|||
path="/api/v1/telephony/twiml",
|
||||
query={
|
||||
"workflow_id": 7,
|
||||
"user_id": 8,
|
||||
"workflow_run_id": 123,
|
||||
"organization_id": 11,
|
||||
},
|
||||
|
|
@ -188,7 +185,6 @@ async def test_twiml_route_rejects_missing_signature():
|
|||
with pytest.raises(HTTPException) as exc_info:
|
||||
await handle_twiml_webhook(
|
||||
workflow_id=7,
|
||||
user_id=8,
|
||||
workflow_run_id=123,
|
||||
organization_id=11,
|
||||
request=request,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue