@@ -43,7 +43,7 @@ async def test_just_app_no_bindings() -> None:
4343 "ctrl+c" ,
4444 "ctrl+backslash" ,
4545 ]
46- assert pilot .app ._bindings .get_key ("ctrl+c" )[0 ].priority is True
46+ assert pilot .app ._bindings .get_bindings_for_key ("ctrl+c" )[0 ].priority is True
4747
4848
4949##############################################################################
@@ -67,8 +67,8 @@ async def test_just_app_alpha_binding() -> None:
6767 assert sorted (pilot .app ._bindings .keys .keys ()) == sorted (
6868 ["ctrl+c" , "ctrl+backslash" , "a" ]
6969 )
70- assert pilot .app ._bindings .get_key ("ctrl+c" )[0 ].priority is True
71- assert pilot .app ._bindings .get_key ("a" )[0 ].priority is True
70+ assert pilot .app ._bindings .get_bindings_for_key ("ctrl+c" )[0 ].priority is True
71+ assert pilot .app ._bindings .get_bindings_for_key ("a" )[0 ].priority is True
7272
7373
7474##############################################################################
@@ -91,8 +91,8 @@ async def test_just_app_low_priority_alpha_binding() -> None:
9191 assert sorted (pilot .app ._bindings .keys .keys ()) == sorted (
9292 ["ctrl+c" , "ctrl+backslash" , "a" ]
9393 )
94- assert pilot .app ._bindings .get_key ("ctrl+c" )[0 ].priority is True
95- assert pilot .app ._bindings .get_key ("a" )[0 ].priority is False
94+ assert pilot .app ._bindings .get_bindings_for_key ("ctrl+c" )[0 ].priority is True
95+ assert pilot .app ._bindings .get_bindings_for_key ("a" )[0 ].priority is False
9696
9797
9898##############################################################################
@@ -121,7 +121,7 @@ def on_mount(self) -> None:
121121async def test_app_screen_with_bindings () -> None :
122122 """Test a screen with a single key binding defined."""
123123 async with AppWithScreenThatHasABinding ().run_test () as pilot :
124- assert pilot .app .screen ._bindings .get_key ("a" )[0 ].priority is True
124+ assert pilot .app .screen ._bindings .get_bindings_for_key ("a" )[0 ].priority is True
125125
126126
127127##############################################################################
@@ -150,7 +150,7 @@ def on_mount(self) -> None:
150150async def test_app_screen_with_low_bindings () -> None :
151151 """Test a screen with a single low-priority key binding defined."""
152152 async with AppWithScreenThatHasALowBinding ().run_test () as pilot :
153- assert pilot .app .screen ._bindings .get_key ("a" )[0 ].priority is False
153+ assert pilot .app .screen ._bindings .get_bindings_for_key ("a" )[0 ].priority is False
154154
155155
156156##############################################################################
0 commit comments