This commit is contained in:
2025-10-18 12:37:38 -03:00
parent 267a046991
commit 865cb12fbc
5 changed files with 28 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ SK = 'sk'
def pytest_configure():
os.environ['TZ'] = 'America/Sao_Paulo'
os.environ['COURSE_TABLE'] = PYTEST_TABLE_NAME
os.environ['USER_TABLE'] = PYTEST_TABLE_NAME
os.environ['BUCKET_NAME'] = 'saladeaula.digital'
os.environ['DYNAMODB_PARTITION_KEY'] = PK
os.environ['DYNAMODB_SORT_KEY'] = SK

View File

@@ -0,0 +1,19 @@
from http import HTTPMethod, HTTPStatus
from ..conftest import HttpApiProxy, LambdaContext
def test_get_orgs(
app,
seeds,
http_api_proxy: HttpApiProxy,
lambda_context: LambdaContext,
):
r = app.lambda_handler(
http_api_proxy(
raw_path='/users/213a6682-2c59-4404-9189-12eec0a846d4/orgs',
method=HTTPMethod.GET,
),
lambda_context,
)
assert r['statusCode'] == HTTPStatus.OK

View File

@@ -1 +1,4 @@
{"id": "2a8963fc-4694-4fe2-953a-316d1b10f1f5", "sk": "0", "name": "pytest" }
{"id": "2a8963fc-4694-4fe2-953a-316d1b10f1f5", "sk": "0", "name": "pytest" }
// User orgs
{"id": "213a6682-2c59-4404-9189-12eec0a846d4", "sk": "orgs#286f7729-7765-482a-880a-0b153ea799be", "name": "ACME", "cnpj": "00000000000191"}