Skip to content

Commit dbabb27

Browse files
authored
Testing: Move from deprecated assertEquals to assertEqual (#332)
1 parent 0b74401 commit dbabb27

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/core/helper_tests.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def test_try_match(self):
2222
self.assertTrue(try_match('www.com/foo', 'www.com/fo*'))
2323

2424
def test_flexible_str_str(self):
25-
self.assertEquals(flexible_str('Bar, Foo, Qux'), 'Bar, Foo, Qux')
25+
self.assertEqual(flexible_str('Bar, Foo, Qux'), 'Bar, Foo, Qux')
2626

2727
def test_flexible_str_set(self):
28-
self.assertEquals(flexible_str({'Foo', 'Bar', 'Qux'}),
28+
self.assertEqual(flexible_str({'Foo', 'Bar', 'Qux'}),
2929
'Bar, Foo, Qux')
3030

3131
def test_serialize_options(self):
@@ -43,24 +43,24 @@ def test_serialize_options(self):
4343
def test_get_allow_headers_empty(self):
4444
options = serialize_options({'allow_headers': r'*'})
4545

46-
self.assertEquals(get_allow_headers(options, ''), None)
47-
self.assertEquals(get_allow_headers(options, None), None)
46+
self.assertEqual(get_allow_headers(options, ''), None)
47+
self.assertEqual(get_allow_headers(options, None), None)
4848

4949
def test_get_allow_headers_matching(self):
5050
options = serialize_options({'allow_headers': r'*'})
5151

52-
self.assertEquals(get_allow_headers(options, 'X-FOO'), 'X-FOO')
53-
self.assertEquals(
52+
self.assertEqual(get_allow_headers(options, 'X-FOO'), 'X-FOO')
53+
self.assertEqual(
5454
get_allow_headers(options, 'X-Foo, X-Bar'),
5555
'X-Bar, X-Foo'
5656
)
5757

5858
def test_get_allow_headers_matching_none(self):
5959
options = serialize_options({'allow_headers': r'X-FLASK-.*'})
6060

61-
self.assertEquals(get_allow_headers(options, 'X-FLASK-CORS'),
61+
self.assertEqual(get_allow_headers(options, 'X-FLASK-CORS'),
6262
'X-FLASK-CORS')
63-
self.assertEquals(
63+
self.assertEqual(
6464
get_allow_headers(options, 'X-NOT-FLASK-CORS'),
6565
''
6666
)

0 commit comments

Comments
 (0)