fix enrollment
This commit is contained in:
@@ -26,6 +26,7 @@ def test_enroll(
|
||||
headers={'X-Tenant': 'cJtK9SsnJhKPyxESe7g3DG'},
|
||||
body={
|
||||
'items': [
|
||||
# existing enrollment, must fail
|
||||
{
|
||||
'user': {
|
||||
'id': '5OxmMjL-ujoR5IMGegQz',
|
||||
@@ -37,9 +38,6 @@ def test_enroll(
|
||||
'id': '6d69a34a-cefd-40aa-a89b-dceb694c3e61',
|
||||
'name': 'pytest',
|
||||
},
|
||||
'deduplication_window': {
|
||||
'offset_days': 60,
|
||||
},
|
||||
},
|
||||
{
|
||||
'user': {
|
||||
@@ -52,6 +50,9 @@ def test_enroll(
|
||||
'id': '6d69a34a-cefd-40aa-a89b-dceb694c3e61',
|
||||
'name': 'pytest',
|
||||
},
|
||||
'deduplication_window': {
|
||||
'offset_days': 60,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -59,8 +60,13 @@ def test_enroll(
|
||||
lambda_context,
|
||||
)
|
||||
|
||||
# assert r['statusCode'] == HTTPStatus.OK
|
||||
print(json.loads(r['body']))
|
||||
assert r['statusCode'] == HTTPStatus.OK
|
||||
|
||||
fail, _ = json.loads(r['body'])
|
||||
assert fail['cause'] == {
|
||||
'type': 'DeduplicationConflictError',
|
||||
'message': 'Enrollment already exists',
|
||||
}
|
||||
|
||||
|
||||
def test_vacancies(
|
||||
|
||||
Reference in New Issue
Block a user