def mock_datasource_http_oauth2(mock_datasource):
    """Mock DataSource object with http oauth2 credentials"""
    mock_datasource.credentials = b"client_id: FOO\nclient_secret: oldisfjowe84uwosdijf"
    mock_datasource.location = "http://foo.com"
    return mock_datasource