Esempio n. 1
0
 def test_both_opts(self):
     """Provide data which should be ignored and which should be encoded."""
     for target in self.to_encode:
         source = target.copy()
         source.update(self.to_ignore)
         self.assertEqual(urlencode(target), client._curl_arg_data(source))
Esempio n. 2
0
 def test_ignored_opts(self):
     """Provide URL parameters which should not be encoded."""
     self.assertEqual(urlencode({}), client._curl_arg_data(self.to_ignore))
Esempio n. 3
0
 def test_valid_opts(self):
     """Provide URL parameters which should be encoded."""
     for params in self.to_encode:
         self.assertEqual(urlencode(params), client._curl_arg_data(params))
Esempio n. 4
0
 def test_null(self):
     """Provide no URL parameters."""
     self.assertEqual(urlencode({}), client._curl_arg_data({}))