mirror of
https://github.com/retailcrm/api-client-python.git
synced 2024-11-24 22:16:06 +03:00
fix tests
This commit is contained in:
parent
2d45f82287
commit
a1da7796c4
@ -3,6 +3,7 @@ python:
|
|||||||
- '3.4'
|
- '3.4'
|
||||||
- '3.5'
|
- '3.5'
|
||||||
- '3.6'
|
- '3.6'
|
||||||
|
- '3.7'
|
||||||
before_install:
|
before_install:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
script:
|
script:
|
||||||
|
@ -30,7 +30,7 @@ class TestVersion3(unittest.TestCase):
|
|||||||
'https://epoqwieqwpoieqpwoeiqpwoeiq.retailcrm.ru', '98sdf9sj8fsd9fjs9dfjs98')
|
'https://epoqwieqwpoieqpwoeiqpwoeiq.retailcrm.ru', '98sdf9sj8fsd9fjs9dfjs98')
|
||||||
response = client.statistic_update()
|
response = client.statistic_update()
|
||||||
|
|
||||||
self.assertTrue(response.is_successful(), False)
|
self.assertIsNot(response.is_successful(), True)
|
||||||
self.assertEqual(response.get_error_msg(), 'Account does not exist.')
|
self.assertEqual(response.get_error_msg(), 'Account does not exist.')
|
||||||
|
|
||||||
def test_wrong_api_key(self):
|
def test_wrong_api_key(self):
|
||||||
|
@ -30,7 +30,7 @@ class TestVersion4(unittest.TestCase):
|
|||||||
'https://epoqwieqwpoieqpwoeiqpwoeiq.retailcrm.ru', '98sdf9sj8fsd9fjs9dfjs98')
|
'https://epoqwieqwpoieqpwoeiqpwoeiq.retailcrm.ru', '98sdf9sj8fsd9fjs9dfjs98')
|
||||||
response = client.statistic_update()
|
response = client.statistic_update()
|
||||||
|
|
||||||
self.assertTrue(response.is_successful(), False)
|
self.assertIsNot(response.is_successful(), True)
|
||||||
self.assertEqual(response.get_error_msg(), 'Account does not exist.')
|
self.assertEqual(response.get_error_msg(), 'Account does not exist.')
|
||||||
|
|
||||||
def test_wrong_api_key(self):
|
def test_wrong_api_key(self):
|
||||||
|
@ -30,7 +30,7 @@ class TestVersion5(unittest.TestCase):
|
|||||||
'https://epoqwieqwpoieqpwoeiqpwoeiq.retailcrm.ru', '98sdf9sj8fsd9fjs9answer98')
|
'https://epoqwieqwpoieqpwoeiqpwoeiq.retailcrm.ru', '98sdf9sj8fsd9fjs9answer98')
|
||||||
response = client.statistic_update()
|
response = client.statistic_update()
|
||||||
|
|
||||||
self.assertTrue(response.is_successful(), False)
|
self.assertIsNot(response.is_successful(), True)
|
||||||
self.assertEqual(response.get_error_msg(), 'Account does not exist.')
|
self.assertEqual(response.get_error_msg(), 'Account does not exist.')
|
||||||
|
|
||||||
def test_wrong_api_key(self):
|
def test_wrong_api_key(self):
|
||||||
@ -67,33 +67,6 @@ class TestVersion5(unittest.TestCase):
|
|||||||
|
|
||||||
self.assertTrue(response.is_successful(), True)
|
self.assertTrue(response.is_successful(), True)
|
||||||
|
|
||||||
# def test_telephony_calls_upload(self):
|
|
||||||
# """
|
|
||||||
# V5 Test telephony calls upload
|
|
||||||
# """
|
|
||||||
#
|
|
||||||
# calls = [
|
|
||||||
# {
|
|
||||||
# 'date': '2018-04-20 22:10:00',
|
|
||||||
# 'type': 'in',
|
|
||||||
# 'phone': '+79999999999',
|
|
||||||
# 'userId': os.getenv('RETAILCRM_USER'),
|
|
||||||
# 'result': 'answered'
|
|
||||||
# },
|
|
||||||
# {
|
|
||||||
# 'date': '2018-04-20 22:10:00',
|
|
||||||
# 'type': 'out',
|
|
||||||
# 'phone': '+79999999999',
|
|
||||||
# 'userId': os.getenv('RETAILCRM_USER'),
|
|
||||||
# 'result': 'answered'
|
|
||||||
# }
|
|
||||||
# ]
|
|
||||||
#
|
|
||||||
# response = self.client.telephony_calls_upload(calls)
|
|
||||||
#
|
|
||||||
# self.assertTrue(response.is_successful(), True)
|
|
||||||
# self.assertTrue(response.get_status_code() < 400, True)
|
|
||||||
|
|
||||||
def test_set_user_status(self):
|
def test_set_user_status(self):
|
||||||
response = self.client.user_status(os.getenv('RETAILCRM_USER'), 'dinner')
|
response = self.client.user_status(os.getenv('RETAILCRM_USER'), 'dinner')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user