@@ -27,7 +27,7 @@ def test_wrong_api_url(self):
2727 V5 Test wrong api url
2828 """
2929 client = retailcrm .v5 (
30- 'https://epoqwieqwpoieqpwoeiqpwoeiq.retailcrm.ru' , '98sdf9sj8fsd9fjs9dfjs98 ' )
30+ 'https://epoqwieqwpoieqpwoeiqpwoeiq.retailcrm.ru' , '98sdf9sj8fsd9fjs9answer98 ' )
3131 response = client .statistic_update ()
3232
3333 self .assertTrue (response .is_successful (), False )
@@ -37,8 +37,7 @@ def test_wrong_api_key(self):
3737 """
3838 V5 Test wrong api key
3939 """
40- client = retailcrm .v5 (os .getenv ('RETAILCRM_URL' ),
41- '98sdf9sj8fsd9fjs9dfjs98' )
40+ client = retailcrm .v5 (os .getenv ('RETAILCRM_URL' ), '98sdf9sj8fsd9fjs9answer98' )
4241 response = client .statistic_update ()
4342
4443 self .assertEqual (response .get_error_msg (), 'Wrong "apiKey" value.' )
@@ -67,3 +66,36 @@ def test_api_credentials(self):
6766 response = self .client .api_credentials ()
6867
6968 self .assertTrue (response .is_successful (), True )
69+
70+ # def test_telephony_calls_upload(self):
71+ # """
72+ # V5 Test telephony calls upload
73+ # """
74+ #
75+ # calls = [
76+ # {
77+ # 'date': '2018-04-20 22:10:00',
78+ # 'type': 'in',
79+ # 'phone': '+79999999999',
80+ # 'userId': os.getenv('RETAILCRM_USER'),
81+ # 'result': 'answered'
82+ # },
83+ # {
84+ # 'date': '2018-04-20 22:10:00',
85+ # 'type': 'out',
86+ # 'phone': '+79999999999',
87+ # 'userId': os.getenv('RETAILCRM_USER'),
88+ # 'result': 'answered'
89+ # }
90+ # ]
91+ #
92+ # response = self.client.telephony_calls_upload(calls)
93+ #
94+ # self.assertTrue(response.is_successful(), True)
95+ # self.assertTrue(response.get_status_code() < 400, True)
96+
97+ def test_set_user_status (self ):
98+ response = self .client .user_status (os .getenv ('RETAILCRM_USER' ), 'dinner' )
99+
100+ self .assertTrue (response .is_successful (), True )
101+ self .assertTrue (response .get_status_code () < 400 , True )
0 commit comments