Merge pull request #15 from gwinn/master

Fix tests
This commit is contained in:
Alex Lushpai 2020-02-19 15:30:40 +03:00 committed by GitHub
commit 6e51a8cfc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 30 deletions

1
.python-version Normal file
View File

@ -0,0 +1 @@
3.7.3

View File

@ -3,6 +3,7 @@ python:
- '3.4'
- '3.5'
- '3.6'
- '3.7'
before_install:
- pip install -r requirements.txt
script:

View File

@ -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):

View File

@ -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):

View File

@ -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')