File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22# coding=utf-8
33
4- import sys
54import os
65import re
76from setuptools import setup
8- from setuptools .command .test import test as TestCommand
9- import re
107
118HERE = os .path .abspath (os .path .dirname (__file__ ))
129PACKAGE_NAME = 'mailjet_rest'
23202421 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' ,
Original file line number Diff line number Diff line change 44import random
55import string
66
7+
78class 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+
7577if __name__ == '__main__' :
7678 unittest .main ()
You can’t perform that action at this time.
0 commit comments