summaryrefslogtreecommitdiff
path: root/tests/test_common.py
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2019-08-15 12:21:22 +0300
committerHugo <hugovk@users.noreply.github.com>2019-08-15 12:24:34 +0300
commit9590ca26d35267f15501605c488581589f1ad91e (patch)
treeb7fb69bbca83afe3c2909f8b52c72a169af56f71 /tests/test_common.py
parentb41d4801dec588d82e6633869ac541e207598297 (diff)
downloadoauthlib-9590ca26d35267f15501605c488581589f1ad91e.tar.gz
Upgrade unit tests to use more useful asserts
Diffstat (limited to 'tests/test_common.py')
-rw-r--r--tests/test_common.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_common.py b/tests/test_common.py
index 2a9a264..5acd8e7 100644
--- a/tests/test_common.py
+++ b/tests/test_common.py
@@ -64,11 +64,11 @@ class ParameterTest(TestCase):
self.assertCountEqual(extract_params([]), [])
def test_extract_non_formencoded_string(self):
- self.assertEqual(extract_params('not a formencoded string'), None)
+ self.assertIsNone(extract_params('not a formencoded string'))
def test_extract_invalid(self):
- self.assertEqual(extract_params(object()), None)
- self.assertEqual(extract_params([('')]), None)
+ self.assertIsNone(extract_params(object()))
+ self.assertIsNone(extract_params([('')]))
def test_add_params_to_uri(self):
correct = '{}?{}'.format(URI, PARAMS_FORMENCODED)
@@ -134,7 +134,7 @@ class RequestTest(TestCase):
def test_none_body(self):
r = Request(URI)
- self.assertEqual(r.decoded_body, None)
+ self.assertIsNone(r.decoded_body)
def test_empty_list_body(self):
r = Request(URI, body=[])
@@ -151,12 +151,12 @@ class RequestTest(TestCase):
def test_non_formencoded_string_body(self):
body = 'foo bar'
r = Request(URI, body=body)
- self.assertEqual(r.decoded_body, None)
+ self.assertIsNone(r.decoded_body)
def test_param_free_sequence_body(self):
body = [1, 1, 2, 3, 5, 8, 13]
r = Request(URI, body=body)
- self.assertEqual(r.decoded_body, None)
+ self.assertIsNone(r.decoded_body)
def test_list_body(self):
r = Request(URI, body=PARAMS_TWOTUPLE)