예제 #1
0
 def test_parse_key_pair_list_in_dict(self):
     self.assertEqual(
         parse_key_pair('a[b][]=1'),
         {'a': {'b': ['1']}})
예제 #2
0
 def test_parse_key_pair_dict_in_list(self):
     self.assertEqual(
         parse_key_pair('a[][a]=1'),
         {'a': [{'a': '1'}]})
예제 #3
0
 def test_parse_key_pair_list(self):
     self.assertEqual(
         parse_key_pair('a[]=1'),
         {'a': ['1']})
예제 #4
0
 def test_parse_key_pair_dict(self):
     self.assertEqual(
         parse_key_pair('a[b]=1'),
         {'a': {'b': '1'}})
예제 #5
0
 def test_parse_key_pair_simple(self):
     self.assertEqual(
         parse_key_pair('a=1'),
         {'a': '1'})