diff --git a/test_requests.py b/test_requests.py index 4ffd6847..5f4f472a 100755 --- a/test_requests.py +++ b/test_requests.py @@ -1224,6 +1224,7 @@ class TestCaseInsensitiveDict(unittest.TestCase): del othercid['spam'] assert cid != othercid assert cid == {'spam': 'blueval', 'eggs': 'redval'} + assert cid != object() def test_setdefault(self): cid = CaseInsensitiveDict({'Spam': 'blueval'}) @@ -1261,6 +1262,23 @@ class TestCaseInsensitiveDict(unittest.TestCase): assert frozenset(cid.keys()) == keyset assert frozenset(cid) == keyset + def test_copy(self): + cid = CaseInsensitiveDict({ + 'Accept': 'application/json', + 'user-Agent': 'requests', + }) + cid_copy = cid.copy() + assert cid == cid_copy + cid['changed'] = True + assert cid != cid_copy + + def test_repr(self): + cid = CaseInsensitiveDict({ + 'Accept': 'application/json', + 'user-Agent': 'requests', + }) + assert repr(cid) == "{'Accept': 'application/json', 'user-Agent': 'requests'}" + class UtilsTestCase(unittest.TestCase):