add batch
This commit is contained in:
@@ -11,6 +11,42 @@ from layercake.dynamodb import (
|
||||
from ..conftest import HttpApiProxy, LambdaContext
|
||||
|
||||
|
||||
def test_enroll(
|
||||
mock_app,
|
||||
dynamodb_seeds,
|
||||
dynamodb_persistence_layer: DynamoDBPersistenceLayer,
|
||||
http_api_proxy: HttpApiProxy,
|
||||
lambda_context: LambdaContext,
|
||||
):
|
||||
r = mock_app.lambda_handler(
|
||||
http_api_proxy(
|
||||
raw_path='/enrollments',
|
||||
method=HTTPMethod.POST,
|
||||
headers={'X-Tenant': 'cJtK9SsnJhKPyxESe7g3DG'},
|
||||
body={
|
||||
'items': [
|
||||
{
|
||||
'user': {
|
||||
'id': '5OxmMjL-ujoR5IMGegQz',
|
||||
'name': 'Sérgio R Siqueira',
|
||||
'email': 'sergio@somosbeta.com.br',
|
||||
'cpf': '07879819908',
|
||||
},
|
||||
'course': {
|
||||
'id': '6d69a34a-cefd-40aa-a89b-dceb694c3e61',
|
||||
'name': 'pytest',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
lambda_context,
|
||||
)
|
||||
|
||||
assert r['statusCode'] == HTTPStatus.OK
|
||||
print(r)
|
||||
|
||||
|
||||
def test_vacancies(
|
||||
mock_app,
|
||||
dynamodb_seeds,
|
||||
@@ -28,7 +64,6 @@ def test_vacancies(
|
||||
)
|
||||
|
||||
assert r['statusCode'] == HTTPStatus.OK
|
||||
print(r)
|
||||
|
||||
|
||||
def test_cancel_enrollment(
|
||||
|
||||
@@ -138,7 +138,6 @@ def test_get_orgs(
|
||||
)
|
||||
|
||||
assert r['statusCode'] == HTTPStatus.OK
|
||||
print(r)
|
||||
|
||||
|
||||
def test_get_logs(
|
||||
|
||||
Reference in New Issue
Block a user