Skip to content

Commit b28beb9

Browse files
authored
Replace assertEquals() to fix tests with Python 3.12 (#332)
1 parent ff6b7a7 commit b28beb9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/test_managers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def test_create_resource_with_stream_uploads(self):
125125
with warnings.catch_warnings(record=True) as w:
126126
warnings.simplefilter('always')
127127
issue = self.redmine.issue.create(project_id=1, subject='Foo', uploads=[{'path': stream}])
128-
self.assertEquals(len(w), 1)
128+
self.assertEqual(len(w), 1)
129129
self.assertIs(w[0].category, exceptions.PerformanceWarning)
130130
self.assertEqual(issue.project_id, 1)
131131
self.assertEqual(issue.subject, 'Foo')
@@ -166,7 +166,7 @@ def test_update_resource_with_stream_uploads(self):
166166
with warnings.catch_warnings(record=True) as w:
167167
warnings.simplefilter('always')
168168
self.assertEqual(self.redmine.issue.update(1, subject='Bar', uploads=[{'path': stream}]), True)
169-
self.assertEquals(len(w), 1)
169+
self.assertEqual(len(w), 1)
170170
self.assertIs(w[0].category, exceptions.PerformanceWarning)
171171

172172
def test_update_resource_returns_none(self):

tests/test_redmine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def test_successful_filestream_upload(self):
7777
with warnings.catch_warnings(record=True) as w:
7878
warnings.simplefilter('always')
7979
self.assertEqual(self.redmine.upload(StringIO(b'\xcf\x86oo'.decode('utf-8')))['token'], '456789')
80-
self.assertEquals(len(w), 1)
80+
self.assertEqual(len(w), 1)
8181
self.assertIs(w[0].category, exceptions.PerformanceWarning)
8282

8383
@mock.patch('redminelib.open', mock.mock_open(), create=True)

0 commit comments

Comments
 (0)