add delete
This commit is contained in:
@@ -142,6 +142,33 @@ def test_get_custom_pricing(
|
||||
assert json.loads(r['body']) == expected
|
||||
|
||||
|
||||
def test_delete_custom_pricing(
|
||||
mock_app,
|
||||
dynamodb_seeds,
|
||||
dynamodb_persistence_layer: DynamoDBPersistenceLayer,
|
||||
http_api_proxy: HttpApiProxy,
|
||||
lambda_context: LambdaContext,
|
||||
):
|
||||
mock_app.lambda_handler(
|
||||
http_api_proxy(
|
||||
raw_path='/orgs/cJtK9SsnJhKPyxESe7g3DG/custompricing',
|
||||
method=HTTPMethod.DELETE,
|
||||
body={'course_id': '281198c2-f293-4acc-b96e-e4a2d5f6b73c'},
|
||||
),
|
||||
lambda_context,
|
||||
)
|
||||
|
||||
data = dynamodb_persistence_layer.collection.get_item(
|
||||
KeyPair(
|
||||
'CUSTOM_PRICING#ORG#cJtK9SsnJhKPyxESe7g3DG',
|
||||
'COURSE#15ee05a3-4ceb-4b7e-9979-db75b28c9ade',
|
||||
),
|
||||
raise_on_error=False,
|
||||
)
|
||||
|
||||
assert not data
|
||||
|
||||
|
||||
def test_post_custom_pricing(
|
||||
mock_app,
|
||||
dynamodb_seeds,
|
||||
|
||||
Reference in New Issue
Block a user