mirror of
https://github.com/retailcrm/api-client-python.git
synced 2024-11-21 20:46:03 +03:00
commit
6e51a8cfc9
1
.python-version
Normal file
1
.python-version
Normal file
@ -0,0 +1 @@
|
||||
3.7.3
|
@ -3,6 +3,7 @@ python:
|
||||
- '3.4'
|
||||
- '3.5'
|
||||
- '3.6'
|
||||
- '3.7'
|
||||
before_install:
|
||||
- pip install -r requirements.txt
|
||||
script:
|
||||
|
@ -30,7 +30,7 @@ class TestVersion3(unittest.TestCase):
|
||||
'https://epoqwieqwpoieqpwoeiqpwoeiq.retailcrm.ru', '98sdf9sj8fsd9fjs9dfjs98')
|
||||
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.')
|
||||
|
||||
def test_wrong_api_key(self):
|
||||
|
@ -30,7 +30,7 @@ class TestVersion4(unittest.TestCase):
|
||||
'https://epoqwieqwpoieqpwoeiqpwoeiq.retailcrm.ru', '98sdf9sj8fsd9fjs9dfjs98')
|
||||
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.')
|
||||
|
||||
def test_wrong_api_key(self):
|
||||
|
@ -30,7 +30,7 @@ class TestVersion5(unittest.TestCase):
|
||||
'https://epoqwieqwpoieqpwoeiqpwoeiq.retailcrm.ru', '98sdf9sj8fsd9fjs9answer98')
|
||||
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.')
|
||||
|
||||
def test_wrong_api_key(self):
|
||||
@ -67,33 +67,6 @@ class TestVersion5(unittest.TestCase):
|
||||
|
||||
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):
|
||||
response = self.client.user_status(os.getenv('RETAILCRM_USER'), 'dinner')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user