Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from mamba import description, it
from expects import expect, be_none, equal
from amadeus import Client, Location
with description('Client') as self:
with it('should exist'):
expect(Client).not_to(be_none)
with it('should have helper locations'):
expect(Location).not_to(be_none)
expect(Location.ANY).to(equal('AIRPORT,CITY'))
from amadeus import Client, ResponseError
from amadeus import Location
amadeus = Client()
print('Airport and City Search')
try:
'''
Which cities or airports start with 'r'?
'''
response = amadeus.reference_data.locations.get(keyword='r',
subType=Location.ANY)
print(response.data)
except ResponseError as error:
raise error