Пример #1
0
def test_init_developer_key(mocker):
    sheets = gsheets.Sheets(developer_key=mocker.sentinel.developer_key)

    assert isinstance(sheets, gsheets.Sheets)
    assert sheets._creds is None
    assert sheets._developer_key == mocker.sentinel.developer_key
Пример #2
0
def sheets(mocker):
    return gsheets.Sheets(credentials=mocker.sentinel.credentials)
Пример #3
0
def test_init_fail():
    with pytest.raises(ValueError):
        gsheets.Sheets()
Пример #4
0
def sheet(spreadsheet_values):
    id = spreadsheet_values['spreadsheet']['spreadsheetId']
    yield gsheets.Sheets(credentials=None)[id]
Пример #5
0
def sheet(mocker, spreadsheet_values):
    id = spreadsheet_values['spreadsheet']['spreadsheetId']
    yield gsheets.Sheets(credentials=mocker.sentinel.credentials)[id]
Пример #6
0
def sheets():
    return gsheets.Sheets(credentials=None)
Пример #7
0
def test_key():
    sheets = gsheets.Sheets(developer_key='key')

    assert isinstance(sheets, gsheets.Sheets)
    assert sheets._key == 'key'