Esempio n. 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\''
    )
Esempio n. 2
0
def test_sql_solid():
    result = sql_solid('foo', 'select * from bar', 'table', 'quux')
    assert result
Esempio n. 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\']'
Esempio n. 4
0
def test_sql_solid():
    result = sql_solid("foo", "select * from bar", "table", "quux")
    assert result
Esempio n. 5
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'"
Esempio n. 6
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']"
Esempio n. 7
0
def test_sql_solid():
    solid = sql_solid("foo", "select * from bar", "table", "quux")
    assert solid