def test_parse_key_pair_list_in_dict(self): self.assertEqual( parse_key_pair('a[b][]=1'), {'a': {'b': ['1']}})
def test_parse_key_pair_dict_in_list(self): self.assertEqual( parse_key_pair('a[][a]=1'), {'a': [{'a': '1'}]})
def test_parse_key_pair_list(self): self.assertEqual( parse_key_pair('a[]=1'), {'a': ['1']})
def test_parse_key_pair_dict(self): self.assertEqual( parse_key_pair('a[b]=1'), {'a': {'b': '1'}})
def test_parse_key_pair_simple(self): self.assertEqual( parse_key_pair('a=1'), {'a': '1'})