Beispiel #1
0
 def test_both_opts(self):
     """Provide data which should be ignored and which should be encoded."""
     self.assertEqual(
         client._curl_arg_data(dict(
             self.to_encode.items() + self.to_ignore.items()
         )),
         urlencode(self.to_encode),
     )
Beispiel #2
0
 def test_ignored_opts(self):
     """Provide data which should be ignored."""
     self.assertEqual(
         client._curl_arg_data(self.to_ignore),
         urlencode({}),
     )
Beispiel #3
0
 def test_valid_opts(self):
     """Provide data which should be encoded."""
     self.assertEqual(
         client._curl_arg_data(self.to_encode),
         urlencode(self.to_encode),
     )
Beispiel #4
0
 def test_null(self):
     """Do not provide any data to be encoded."""
     self.assertEqual(
         client._curl_arg_data({}),
         urlencode({}),
     )