예제 #1
0
def test_get_table_name():
    project_name = "my_project"
    dataset_name = "my_dataset"
    feature_id = "myentity.none.feature1"
    storage_spec = StorageSpec(id="BIGQUERY1", type="bigquery",
                               options={"project": project_name,
                                        "dataset": dataset_name})
    assert get_table_name(feature_id, storage_spec) == \
           "my_project.my_dataset.myentity_none"
예제 #2
0
def test_get_table_name_not_bq():
    feature_id = "myentity.feature1"
    storage_spec = StorageSpec(id="REDIS1", type="redis")
    with pytest.raises(ValueError,
                       match="storage spec is not BigQuery storage spec"):
        get_table_name(feature_id, storage_spec)