-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest_send_message_method.py
56 lines (40 loc) · 2.11 KB
/
test_send_message_method.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
'''
API tests for sendMessage method
\nCommand to start SendMessage tests: pytest . -s -m sendmessage
'''
import pytest
from telegram_api_tests import TEST_USER_ID
from telegram_api_tests.api_requests.send_message import SendMessageRequest
@pytest.mark.sendmessage
class TestSendMessageMethod():
@pytest.fixture(scope="class", autouse=True)
def setup(self):
global request
request = SendMessageRequest('sendMessage', chat_id=TEST_USER_ID, text='test message')
request.send()
def test_send_message_request_should_return_status_ok(self):
request.should_be_status_ok()
def test_send_message_request_should_return_status_code_200(self):
request.should_be_status_code_200()
def test_send_message_request_should_return_result_of_request(self):
request.should_be_result_of_request_in_response()
def test_send_message_request_should_return_correct_bot_id(self):
request.should_be_correct_id_of_bot()
def test_send_message_request_should_return_correct_is_bot_status(self):
request.should_be_response_from_a_bot()
def test_send_message_request_should_return_correct_first_name_of_a_bot(self):
request.should_be_correct_first_name_of_a_bot()
def test_send_message_request_should_return_correct_username_of_a_bot(self):
request.should_be_correct_username_of_a_bot()
def test_send_message_request_should_return_correct_receiver_id(self):
request.should_be_correct_receiver_id()
def test_send_message_request_should_return_correct_receiver_first_name(self):
request.should_be_correct_receiver_first_name()
def test_send_message_request_should_return_correct_receiver_last_name(self):
request.should_be_correct_receiver_last_name()
def test_send_message_request_should_return_correct_receiver_username(self):
request.should_be_correct_receiver_username()
def test_send_message_request_should_return_correct_chat_type(self):
request.should_be_correct_chat_type()
def test_send_message_request_should_return_correct_message_text(self):
request.should_be_correct_message_text()