add better auth
This commit is contained in:
@@ -18,19 +18,21 @@ def test_post_course(
|
||||
http_api_proxy(
|
||||
raw_path='/courses',
|
||||
method=HTTPMethod.POST,
|
||||
headers={'Tenant': '*'},
|
||||
body={
|
||||
'course': {
|
||||
'name': 'pytest',
|
||||
'access_period': 365,
|
||||
},
|
||||
'org': {
|
||||
'id': '6RQuJ7koa9Gz4ZXTA4NeGR',
|
||||
'name': 'EDUSEG',
|
||||
},
|
||||
'cert': {
|
||||
'exp_interval': 730, # 2 years
|
||||
},
|
||||
}
|
||||
},
|
||||
),
|
||||
lambda_context,
|
||||
)
|
||||
|
||||
print(r)
|
||||
|
||||
assert 'id' in json.loads(r['body'])
|
||||
assert r['statusCode'] == HTTPStatus.CREATED
|
||||
|
||||
Reference in New Issue
Block a user