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\'')
def test_sql_solid(): result = sql_solid('foo', 'select * from bar', 'table', 'quux') assert result
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\']'