File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11import unittest
22from mailjet_rest import Client , __version__
33import os
4-
4+ import random
5+ import string
56
67class TestSuite (unittest .TestCase ):
78
@@ -31,8 +32,13 @@ def test_get_with_data(self):
3132 self .failUnless (result .status_code == 200 )
3233
3334 def test_get_with_action (self ):
35+ cl_random_name = '' .join (random .choice (string .ascii_uppercase + string .digits ) for _ in range (10 ))
36+ post_cl = self .client .contactslist .create (data = {'Name' : cl_random_name })
37+
38+ self .failUnless (post_cl .status_code == 201 )
3439 result_cl = self .client .contactslist .get (filters = {'limit' : 1 }).json ()
3540 self .failUnless (result_cl ['Count' ] > 0 )
41+
3642 result = self .client .contact_getcontactslists .get (result_cl ['Data' ][0 ]['ID' ]).json ()
3743 self .failUnless ('Count' in result )
3844
You can’t perform that action at this time.
0 commit comments