mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Use patch.dict in deprecation test "test_check_if_deprecated_constant" (#106117)
This commit is contained in:
parent
56967a92e0
commit
5a3db078d5
@ -293,10 +293,8 @@ def test_check_if_deprecated_constant(
|
||||
}
|
||||
filename = f"/home/paulus/{module_name.replace('.', '/')}.py"
|
||||
|
||||
# mock module for homeassistant/helpers/frame.py#get_integration_frame
|
||||
sys.modules[module_name] = Mock(__file__=filename)
|
||||
|
||||
with patch(
|
||||
# mock sys.modules for homeassistant/helpers/frame.py#get_integration_frame
|
||||
with patch.dict(sys.modules, {module_name: Mock(__file__=filename)}), patch(
|
||||
"homeassistant.helpers.frame.extract_stack",
|
||||
return_value=[
|
||||
Mock(
|
||||
|
Loading…
x
Reference in New Issue
Block a user