Fix Python3.7 compatibility issue
authorTaylor Jung <jupid2@korea.ac.kr>
Sat, 12 May 2018 11:11:12 +0000 (20:11 +0900)
committerGitHub <noreply@github.com>
Sat, 12 May 2018 11:11:12 +0000 (20:11 +0900)
passing "async" argument can make invalid argument error on python 3.7

tests/test_streaming.py

index de913573925a7289948e5910bcb8a765852cc1b0..d3c911a7cf79ea1f260a1bbdc6af09437b9b2048 100644 (file)
@@ -105,7 +105,7 @@ class TweepyStreamTests(unittest.TestCase):
 
     def test_track_encoding(self):
         s = Stream(None, None)
-        s._start = lambda async: None
+        s._start = lambda is_async: None
         s.filter(track=[u'Caf\xe9'])
 
         # Should be UTF-8 encoded
@@ -113,7 +113,7 @@ class TweepyStreamTests(unittest.TestCase):
 
     def test_follow_encoding(self):
         s = Stream(None, None)
-        s._start = lambda async: None
+        s._start = lambda is_async: None
         s.filter(follow=[u'Caf\xe9'])
 
         # Should be UTF-8 encoded