Exemplo n.º 1
0
 def test_case_insensitive_dict_key_value_update(self):
     d = CaseInsensitiveDict({"X-key": "X-value"})
     d["x-key"] = "x-value"
     self.assertEqual(1, len(d))
     self.assertEqual("x-key", list(d.keys())[0])
     self.assertEqual("x-value", list(d.values())[0])
     self.assertEqual("x-value", d["x-key"])
Exemplo n.º 2
0
 def test_case_insensitive_dict_key_value_name_duplicated_keys(self):
     d = CaseInsensitiveDict({"X-key": "X-value", "x-key": "x-value"})
     self.assertEqual(1, len(d))
     self.assertEqual("X-key".lower(), list(d.keys())[0].lower())