def test_create_authentication_signature_2(self):
        """Tests if the default authenticator creates the correct signature"""
        authenticator = DefaultAuthenticator(
            AuthorizationType.get_authorization("v1HMAC"), "apiKeyId",
            "6Kj5HT0MQKC6D8eb7W3lTg71kVKVDSt1")
        data_to_sign = "GET\n" \
                       "\n" \
                       "Fri, 06 Jun 2014 13:39:43 GMT\n" \
                       "/v1/9991/tokens/123456789\n"

        authentication_signature = authenticator.create_authentication_signature(
            data_to_sign)

        self.assertEqual("9ond5EIN05dBXJGCLRK5om9pxHsyrh/12pZJ7bvmwNM=",
                         authentication_signature)
    def test_create_authentication_signature(self):
        """Tests if the default authenticator creates the correct signature"""
        authenticator = DefaultAuthenticator(
            AuthorizationType.get_authorization("v1HMAC"), "apiKeyId",
            "secretApiKey")
        data_to_sign = "DELETE\n" \
                       "application/json\n" \
                       "Fri, 06 Jun 2014 13:39:43 GMT\n" \
                       "x-gcs-clientmetainfo:processed header value\n" \
                       "x-gcs-customerheader:processed header value\n" \
                       "x-gcs-servermetainfo:processed header value\n" \
                       "/v1/9991/tokens/123456789\n"

        authentication_signature = authenticator.create_authentication_signature(
            data_to_sign)

        self.assertEqual("VfnXpPBQQoHZivTcAg0JvOWkhnzlPnaCPKpTQn/uMJM=",
                         authentication_signature)