fix subscription
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
import json
|
||||
from http import HTTPMethod, HTTPStatus
|
||||
|
||||
from ...conftest import HttpApiProxy, LambdaContext
|
||||
|
||||
|
||||
def test_enroll(
|
||||
app,
|
||||
seeds,
|
||||
http_api_proxy: HttpApiProxy,
|
||||
lambda_context: LambdaContext,
|
||||
):
|
||||
r = app.lambda_handler(
|
||||
http_api_proxy(
|
||||
raw_path='/enrollments',
|
||||
method=HTTPMethod.POST,
|
||||
body={
|
||||
'org_id': '2a8963fc-4694-4fe2-953a-316d1b10f1f5',
|
||||
'enrollments': [
|
||||
{
|
||||
'user': {
|
||||
'id': '15bacf02-1535-4bee-9022-19d106fd7518',
|
||||
'name': 'Sérgio R Siqueira',
|
||||
'email': 'sergio@somosbeta.com.br',
|
||||
'cpf': '07879819908',
|
||||
},
|
||||
'course': {
|
||||
'id': 'c27d1b4f-575c-4b6b-82a1-9b91ff369e0b',
|
||||
'name': 'NR-10',
|
||||
'access_period': '360',
|
||||
'unit_price': '100.30',
|
||||
},
|
||||
'scheduled_for': '2028-01-01',
|
||||
},
|
||||
{
|
||||
'user': {
|
||||
'id': '15bacf02-1535-4bee-9022-19d106fd7518',
|
||||
'name': 'Sérgio R Siqueira',
|
||||
'email': 'sergio@somosbeta.com.br',
|
||||
'cpf': '07879819908',
|
||||
},
|
||||
'course': {
|
||||
'id': '9b1bd8e1-b6da-4f68-9a83-c8d5b8f3b628',
|
||||
'name': 'CIPA',
|
||||
'access_period': '360',
|
||||
'unit_price': '99',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
lambda_context,
|
||||
)
|
||||
|
||||
print(r)
|
||||
Reference in New Issue
Block a user