Skip to content

Commit 4f013c0

Browse files
Add unit test
1 parent e0ee95c commit 4f013c0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/unit/aws/test_skeleton.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import TypedDict
22

3+
import moto.core.exceptions
34
import pytest
45
from botocore.parsers import create_parser
56

@@ -250,9 +251,16 @@ def test_skeleton_e2e_sqs_send_message_not_implemented(api_class, oracle_message
250251
}
251252

252253

253-
def test_dispatch_common_service_exception():
254+
@pytest.mark.parametrize(
255+
"exc_factory",
256+
[
257+
CommonServiceException,
258+
moto.core.exceptions.ServiceException,
259+
],
260+
)
261+
def test_dispatch_common_service_exception(exc_factory):
254262
def delete_queue(_context: RequestContext, _request: ServiceRequest):
255-
raise CommonServiceException("NonExistentQueue", "No such queue")
263+
raise exc_factory("NonExistentQueue", "No such queue")
256264

257265
table: DispatchTable = {}
258266
table["DeleteQueue"] = delete_queue

0 commit comments

Comments
 (0)