From 674ccd31bce9c11b99a7f78906b73ffe550ae442 Mon Sep 17 00:00:00 2001 From: Harmon Date: Tue, 9 Feb 2021 22:32:24 -0600 Subject: [PATCH] Update tests using API.get_user to pass keyword arguments --- tests/test_api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 06a6bae..eeb17d3 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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) -- 2.25.1