Keep source, config, and deploy files. Leave runtime data, uploads, and logs out of git. Co-authored-by: Cursor <cursoragent@cursor.com>
14 lines
338 B
Python
14 lines
338 B
Python
import pytest
|
|
|
|
from kamidso.contracts.errors import KamidsoError
|
|
from kamidso.integrations.sql_guard import ensure_read_only_sql
|
|
|
|
|
|
def test_sql_write_blocked():
|
|
with pytest.raises(KamidsoError):
|
|
ensure_read_only_sql("DROP TABLE users")
|
|
|
|
|
|
def test_sql_select_allowed():
|
|
ensure_read_only_sql("SELECT * FROM sales LIMIT 10")
|