Skip to content

Commit 45cf6ff

Browse files
committed
Unit tests: use ssertDictEqual for checking dictionaries
1 parent c9ddfdb commit 45cf6ff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

unit-tests/test_util_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def f(ctx, name: str, age: int):
9797
result = wrapped(DummyContext(), encode_input({'name': 'Yoda', 'age': 900}))
9898

9999
self.assertEqual(result['status'], 'ok')
100-
self.assertEqual(result['data'], {'name': 'Yoda', 'age': 900})
100+
self.assertDictEqual(result['data'], {'name': 'Yoda', 'age': 900})
101101

102102
def test_api_wrapper_accepts_int_for_float_argument(self):
103103
# JSON has no distinct integer/float types, so a `float`-annotated
@@ -130,7 +130,7 @@ def f(ctx, anything):
130130
result = wrapped(DummyContext(), encode_input({'anything': {'nested': [1, 2, 3]}}))
131131

132132
self.assertEqual(result['status'], 'ok')
133-
self.assertEqual(result['data'], {'nested': [1, 2, 3]})
133+
self.assertDictEqual(result['data'], {'nested': [1, 2, 3]})
134134

135135
def test_api_wrapper_reports_missing_required_argument(self):
136136
def f(ctx, name: str, age: int):

0 commit comments

Comments
 (0)