From d267068b779b41a2c3d1e0345d6a226ed0524b63 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 21 Jun 2019 13:38:41 -0500 Subject: [PATCH] Replace deprecated assertEquals in tests With assertEqual https://docs.python.org/3/library/unittest.html#deprecated-aliases --- tests/test_api.py | 4 ++-- tests/test_cursors.py | 2 +- tests/test_streaming.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index e057c44..909b7df 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -427,10 +427,10 @@ class TweepyAPITests(TweepyTestCase): user1 = self.api.get_user('TheTweepyTester') self.assertFalse(self.api.cached_result) - self.assertEquals('TheTweepyTester', user1.screen_name) + self.assertEqual('TheTweepyTester', user1.screen_name) user2 = self.api.get_user('tweepytest') - self.assertEquals('tweepytest', user2.screen_name) + self.assertEqual('tweepytest', user2.screen_name) self.assertFalse(self.api.cached_result) diff --git a/tests/test_cursors.py b/tests/test_cursors.py index b707b34..65fd9ee 100644 --- a/tests/test_cursors.py +++ b/tests/test_cursors.py @@ -44,4 +44,4 @@ class TweepyCursorTests(TweepyTestCase): cursor = Cursor(self.api.user_timeline, id='twitter').items(5) status = cursor.next() - self.assertEquals(status.user.screen_name, 'twitter') + self.assertEqual(status.user.screen_name, 'twitter') diff --git a/tests/test_streaming.py b/tests/test_streaming.py index 4c3020c..21e749d 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -87,15 +87,15 @@ class TweepyStreamTests(unittest.TestCase): def test_sample(self): self.listener.status_stop_count = 10 self.stream.sample() - self.assertEquals(self.listener.status_count, - self.listener.status_stop_count) + self.assertEqual(self.listener.status_count, + self.listener.status_stop_count) def test_filter_track(self): self.listener.status_stop_count = 5 phrases = ['twitter'] self.stream.filter(track=phrases) - self.assertEquals(self.listener.status_count, - self.listener.status_stop_count) + self.assertEqual(self.listener.status_count, + self.listener.status_stop_count) def test_track_encoding(self): s = Stream(None, None) -- 2.25.1