Skip to content

Commit 1423c7b

Browse files
committed
python 3 compatibility
1 parent e446b1c commit 1423c7b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

test/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
class TestSendGrid(unittest.TestCase):
2222
maxDiff = None
23-
23+
2424
def setUp(self):
2525
self.sg = SendGridClient(SG_USER, SG_PWD)
2626

@@ -97,7 +97,10 @@ def test_send(self):
9797
"asm_group_id": 42
9898
}
9999
'''))
100-
self.assertEqual(url, test_url)
100+
try:
101+
self.assertItemsEqual(url, test_url) #python 2
102+
except AttributeError:
103+
self.assertCountEqual(url, test_url)
101104

102105
@unittest.skipUnless(sys.version_info < (3, 0), 'only for python2')
103106
def test__build_body_unicode(self):

0 commit comments

Comments
 (0)