Merge pull request #1545 from haidaraM/fixApiKeyIdentification

Fix ApiGateway key identification
This commit is contained in:
Steve Pulec 2018-04-12 18:58:47 -04:00 committed by GitHub
commit 5f840aadcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View file

@ -976,22 +976,22 @@ def test_api_keys():
apikey_name = 'TESTKEY1'
payload = {'value': apikey_value, 'name': apikey_name}
response = client.create_api_key(**payload)
apikey = client.get_api_key(apiKey=payload['value'])
apikey = client.get_api_key(apiKey=response['id'])
apikey['name'].should.equal(apikey_name)
apikey['value'].should.equal(apikey_value)
apikey_name = 'TESTKEY2'
payload = {'name': apikey_name, 'generateDistinctId': True}
response = client.create_api_key(**payload)
apikey = client.get_api_key(apiKey=response['value'])
apikey_id = response['id']
apikey = client.get_api_key(apiKey=apikey_id)
apikey['name'].should.equal(apikey_name)
len(apikey['value']).should.equal(40)
apikey_value = apikey['value']
response = client.get_api_keys()
len(response['items']).should.equal(2)
client.delete_api_key(apiKey=apikey_value)
client.delete_api_key(apiKey=apikey_id)
response = client.get_api_keys()
len(response['items']).should.equal(1)