"""Fixtures for the authorization.""" import uuid from oto import response def get_authorization_data(**overrides): """Get authorization data. Args: overrides (dict): fields to override. Returns: dict: the authorization data. """ data = { 'authorization_id': 'bd93766e9d7e42afbb6501237fa2b016', 'public_key': ( '-----BEGIN PUBLIC KEY-----\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAME48' 'Z7can1JmGgDIGhkikpAY15/bVc/\n4LrG/R6oQdW+A079uKr/y5ZdGXIVj1XqfsR9' 'gYXbXTxVyghTNhdish8CAwEAAQ==\n-----END PUBLIC KEY-----\n'), 'state': str(uuid.uuid1()), 'client_id': 92734} data.update(**overrides) return data def get_authorization_response(**overrides): """Get authorization response. Args: overrides (dict): fields to override. Returns: response.Response: the authorization data. """ return response.Response(get_authorization_data(**overrides))