def test_when_neither_secret_present(self):
     base_string = generate_base_string(
         HTTP_POST, b("http://example.com/"), self.oauth_params)
     self.assertEqual(generate_plaintext_signature(
         base_string,
         b(""),
         None
     ), b("&"))
 def test_when_token_secret_present(self):
     base_string = generate_base_string(
         HTTP_POST, b("http://example.com/"), self.oauth_params)
     self.assertEqual(generate_plaintext_signature(
         base_string,
         b(""),
         self.oauth_token_secret
     ), b("&token%20test%20secret"))