コード例 #1
0
def test_sql_solid_without_table_name():
    with pytest.raises(Exception) as excinfo:
        sql_solid('foo', 'select * from bar', 'table')
    assert (str(
        excinfo.value
    ) == 'Missing table_name: required for materialization strategy \'table\'')
コード例 #2
0
def test_sql_solid():
    result = sql_solid('foo', 'select * from bar', 'table', 'quux')
    assert result
コード例 #3
0
def test_sql_solid_with_bad_materialization_strategy():
    with pytest.raises(Exception) as excinfo:
        sql_solid('foo', 'select * from bar', 'view')
    assert str(
        excinfo.value
    ) == 'Invalid materialization strategy view, must be one of [\'table\']'