

def test_signature_is_valid(self):
    with user_generator(self.manager, name='admin', secret='admin', access='admin'):
        with project_generator(self.manager, name='admin', manager_user='admin'):
            accesskey = 'admin:admin'
            expected_result = (self.manager.get_user('admin'), self.manager.get_project('admin'))
            sig = 'd67Wzd9Bwz8xid9QU+lzWXcF2Y3tRicYABPJgrqfrwM='
            auth_params = {
                'AWSAccessKeyId': 'admin:admin',
                'Action': 'DescribeAvailabilityZones',
                'SignatureMethod': 'HmacSHA256',
                'SignatureVersion': '2',
                'Timestamp': '2011-04-22T11:29:29',
                'Version': '2009-11-30',
            }
            self.assertTrue(expected_result, self.manager.authenticate(accesskey, sig, auth_params, 'GET', '127.0.0.1:8773', '/services/Cloud/'))
            sig = 'ECYLU6xdFG0ZqRVhQybPJQNJ5W4B9n8fGs6+/fuGD2c='
            auth_params = {
                'AWSAccessKeyId': 'admin:admin',
                'Action': 'DescribeAvailabilityZones',
                'SignatureMethod': 'HmacSHA256',
                'SignatureVersion': '2',
                'Timestamp': '2011-04-22T11:29:49.000Z',
                'Version': '2008-12-01',
            }
            self.assertTrue(expected_result, self.manager.authenticate(auth_params, sig, auth_params, 'GET', '127.0.0.1', '/services/Cloud'))

dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/test_auth.py _AuthManagerBaseTestCase.test_signature_is_valid/VarMisuse@194/427 `accesskey`->`auth_params`