def test_that_the_email_can_be_used_to_get_a_token_when_many_users(self, u1, u2): client = Client('localhost', port=self.auth_port, prefix=None, https=False) client.username = '******' client.password = '******' token_data = client.token.new(expiration=1) assert_that(token_data, has_entries(metadata=has_entries(uuid=u1['uuid']))) client.username = '******' client.password = '******' token_data = client.token.new(expiration=1) assert_that(token_data, has_entries(metadata=has_entries(uuid=u2['uuid'])))
def get_auth(cls, config): auth_config = dict(config['auth']) # FIXME(sileht): Keep the certificate auth_config['verify_certificate'] = False auth = AuthClient(**auth_config) token = auth.token.new('wazo_user', expiration=3600) auth.set_token(token["token"]) auth.username = None auth.password = None return auth