security: add RBAC, HTTPS enforcement; add tests and CI pytest step
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
from modern.backend.app import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
def test_signup_and_login():
|
||||
resp = client.post('/api/v1/auth/signup', json={'email':'test@example.com','password':'secret'})
|
||||
assert resp.status_code == 200
|
||||
resp = client.post('/api/v1/auth/login', json={'email':'test@example.com','password':'secret'})
|
||||
assert resp.status_code == 200
|
||||
assert 'session' in resp.cookies
|
||||
*** End Patch
|
||||
@@ -0,0 +1,10 @@
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
from modern.backend.app import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
def test_list_integrations_empty():
|
||||
resp = client.get('/api/v1/integrations')
|
||||
assert resp.status_code == 200
|
||||
*** End Patch
|
||||
Reference in New Issue
Block a user