Skip to content

Commit c3c3d7b

Browse files
author
Arnaud Breton
committed
Apply Flake8
1 parent b69c36e commit c3c3d7b

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

mailjet_rest/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Config(object):
1515
API_URL = 'https://api.mailjet.com/'
1616
API_REF = 'http://dev.mailjet.com/email-api/v3/'
1717
version = 'v3'
18-
user_agent = 'mailjet-apiv3-python/'+ __version__
18+
user_agent = 'mailjet-apiv3-python/' + __version__
1919

2020
def __init__(self, version=None):
2121
if version is not None:

setup.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
#!/usr/bin/env python
22
# coding=utf-8
33

4-
import sys
54
import os
65
import re
76
from setuptools import setup
8-
from setuptools.command.test import test as TestCommand
9-
import re
107

118
HERE = os.path.abspath(os.path.dirname(__file__))
129
PACKAGE_NAME = 'mailjet_rest'
@@ -23,7 +20,7 @@
2320
author_email='[email protected]',
2421
maintainer='Mailjet',
2522
maintainer_email='[email protected]',
26-
download_url='https://github.com/mailjet/mailjet-apiv3-python/releases/tag/v1.2.2',
23+
download_url='https://github.com/mailjet/mailjet-apiv3-python/releases/tag/v'+__version__,
2724
url='https://github.com/mailjet/mailjet-apiv3-python',
2825
description=('Mailjet V3 API wrapper'),
2926
classifiers=['Development Status :: 3 - Alpha',

test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import random
55
import string
66

7+
78
class TestSuite(unittest.TestCase):
89

910
def setUp(self):
@@ -19,7 +20,7 @@ def test_get_no_param(self):
1920

2021
def test_get_valid_params(self):
2122
result = self.client.contact.get(filters={'limit': 2}).json()
22-
self.failUnless('Count' >= 0 or Count <= 2)
23+
self.failUnless('Count' >= 0 or result['Count'] <= 2)
2324

2425
def test_get_invalid_parameters(self):
2526
# invalid parameters are ignored
@@ -72,5 +73,6 @@ def test_user_agent(self):
7273
)
7374
self.assertEqual(self.client.config.user_agent, 'mailjet-apiv3-python/'+__version__)
7475

76+
7577
if __name__ == '__main__':
7678
unittest.main()

0 commit comments

Comments
 (0)