Skip to content

Commit dbbfea0

Browse files
committed
Merge PR #476 into 16.0
Signed-off-by lmignon
2 parents 140bbdf + 5b21ec2 commit dbbfea0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fastapi/tests/test_fastapi_demo.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from requests import Response
77

88
from odoo.exceptions import UserError
9+
from odoo.tools.misc import mute_logger
910

1011
from fastapi import status
1112

@@ -74,6 +75,7 @@ def test_exception_raised(self) -> None:
7475
"error_message": "User Error",
7576
},
7677
)
78+
7779
with self.assertRaisesRegex(NotImplementedError, "Bare Exception"):
7880
with self._create_test_client() as test_client:
7981
test_client.get(
@@ -84,6 +86,7 @@ def test_exception_raised(self) -> None:
8486
},
8587
)
8688

89+
@mute_logger("odoo.addons.fastapi.tests.common")
8790
def test_exception_not_raised(self) -> None:
8891
with self._create_test_client(raise_server_exceptions=False) as test_client:
8992
response: Response = test_client.get(

0 commit comments

Comments
 (0)