Update tests using API.get_user to pass keyword arguments
authorHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 04:32:24 +0000 (22:32 -0600)
committerHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 04:32:24 +0000 (22:32 -0600)
tests/test_api.py

index 06a6bae520bf0e8dbfbe224989b59e2f4f3547dc..eeb17d3a7f4be43c187656687bb78a70efe3cece 100644 (file)
@@ -115,10 +115,10 @@ class TweepyAPITests(TweepyTestCase):
 
     @tape.use_cassette('testgetuser.json')
     def testgetuser(self):
-        u = self.api.get_user('Twitter')
+        u = self.api.get_user(screen_name='Twitter')
         self.assertEqual(u.screen_name, 'Twitter')
 
-        u = self.api.get_user(783214)
+        u = self.api.get_user(user_id=783214)
         self.assertEqual(u.screen_name, 'Twitter')
 
     @tape.use_cassette('testlookupusers.json')
@@ -400,11 +400,11 @@ class TweepyAPITests(TweepyTestCase):
     def testcachedifferentqueryparameters(self):
         self.api.cache = MemoryCache()
 
-        user1 = self.api.get_user('TweepyDev')
+        user1 = self.api.get_user(screen_name='TweepyDev')
         self.assertFalse(self.api.cached_result)
         self.assertEqual('TweepyDev', user1.screen_name)
 
-        user2 = self.api.get_user('Twitter')
+        user2 = self.api.get_user(screen_name='Twitter')
         self.assertEqual('Twitter', user2.screen_name)
         self.assertFalse(self.api.cached_result)