Beispiel #1
0
def authorize(username, password):
    azion = Azion()
    return azion.authorize(username, password)
Beispiel #2
0
 def test_authorize(self):
     mocked_session = create_mocked_session()
     client = Azion(session=mocked_session)
     client.authorize('foo', 'bar')
     mocked_session.post.assert_called_once_with(
         'https://api.azion.net/tokens', data={}, auth=('foo', 'bar'))