Example #1
0
def temporary_database_with_indexes(temporary_database_with_column):
    snippets.add_index(SPANNER_INSTANCE,
                       temporary_database_with_column.database_id)
    snippets.add_storing_index(SPANNER_INSTANCE,
                               temporary_database_with_column.database_id)

    yield temporary_database_with_column
def temporary_database_with_indexes(cloud_config,
                                    temporary_database_with_column):
    snippets.add_index(cloud_config.spanner_instance,
                       temporary_database_with_column.database_id)
    snippets.add_storing_index(cloud_config.spanner_instance,
                               temporary_database_with_column.database_id)

    yield temporary_database_with_column
def temporary_database_with_indexes(temporary_database_with_column):
    snippets.add_index(
        SPANNER_INSTANCE,
        temporary_database_with_column.database_id)
    snippets.add_storing_index(
        SPANNER_INSTANCE,
        temporary_database_with_column.database_id)

    yield temporary_database_with_column
def temporary_database_with_indexes(
        cloud_config, temporary_database_with_column):
    snippets.add_index(
        cloud_config.spanner_instance,
        temporary_database_with_column.database_id)
    snippets.add_storing_index(
        cloud_config.spanner_instance,
        temporary_database_with_column.database_id)

    yield temporary_database_with_column
Example #5
0
def test_add_index(capsys):
    snippets.add_index(INSTANCE_ID, DATABASE_ID)
    out, _ = capsys.readouterr()
    assert 'Added the AlbumsByAlbumTitle index' in out
Example #6
0
def test_add_index(capsys, instance_id, sample_database):
    snippets.add_index(instance_id, sample_database.database_id)
    out, _ = capsys.readouterr()
    assert "Added the AlbumsByAlbumTitle index" in out
def test_add_index(capsys):
    snippets.add_index(INSTANCE_ID, DATABASE_ID)
    out, _ = capsys.readouterr()
    assert 'Added the AlbumsByAlbumTitle index' in out