forked from Jana-Mobile/layer-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_delete_conversation.py
More file actions
23 lines (18 loc) · 893 Bytes
/
Copy pathtest_delete_conversation.py
File metadata and controls
23 lines (18 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from test_utils import MockRequestResponse, TestPlatformClient
class TestDeleteConverstaion(TestPlatformClient):
def test_delete_conversation(self, layerclient, monkeypatch):
def verify_request_args(method, url, headers, data, params):
assert method == "DELETE"
assert url == (
"https://api.layer.com/apps/TEST_APP_UUID/"
"conversations/TEST_CONVERSATION_UUID"
)
assert headers == {
'Accept': 'application/vnd.layer+json; version=1.0',
'Authorization': 'Bearer TEST_BEARER_TOKEN',
'Content-Type': 'application/json',
}
assert data is None
return MockRequestResponse(True, {})
monkeypatch.setattr("requests.request", verify_request_args)
layerclient.delete_conversation('TEST_CONVERSATION_UUID')