| 1 |
# Unit tests for ax_utils_state.py accessibility state utilities. |
| 2 |
# |
| 3 |
# Copyright 2025 Igalia, S.L. |
| 4 |
# Author: Joanmarie Diggs <[email protected]> |
| 5 |
# |
| 6 |
# This library is free software; you can redistribute it and/or |
| 7 |
# modify it under the terms of the GNU Lesser General Public |
| 8 |
# License as published by the Free Software Foundation; either |
| 9 |
# version 2.1 of the License, or (at your option) any later version. |
| 10 |
# |
| 11 |
# This library is distributed in the hope that it will be useful, |
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
# Lesser General Public License for more details. |
| 15 |
# |
| 16 |
# You should have received a copy of the GNU Lesser General Public |
| 17 |
# License along with this library; if not, write to the |
| 18 |
# Free Software Foundation, Inc., Franklin Street, Fifth Floor, |
| 19 |
# Boston MA 02110-1301 USA. |
| 20 |
|
| 21 |
# pylint: disable=wrong-import-position |
| 22 |
# pylint: disable=import-outside-toplevel |
| 23 |
# pylint: disable=too-many-branches |
| 24 |
|
| 25 |
"""Unit tests for ax_utilities_state.py accessibility state utilities.""" |
| 26 |
|
| 27 |
from __future__ import annotations |
| 28 |
|
| 29 |
from typing import TYPE_CHECKING |
| 30 |
|
| 31 |
import gi |
| 32 |
import pytest |
| 33 |
|
| 34 |
gi.require_version("Atspi", "2.0") |
| 35 |
from gi.repository import Atspi |
| 36 |
|
| 37 |
if TYPE_CHECKING: |
| 38 |
from unittest.mock import MagicMock |
| 39 |
|
| 40 |
from .orca_test_context import OrcaTestContext |
| 41 |
|
| 42 |
|
| 43 |
@pytest.mark.unit |
| 44 |
class TestAXUtilitiesState: |
| 45 |
"""Test AXUtilitiesState class methods.""" |
| 46 |
|
| 47 |
def _setup_dependencies(self, test_context: OrcaTestContext) -> dict[str, MagicMock]: |
| 48 |
"""Set up mocks for ax_utilities_state dependencies.""" |
| 49 |
|
| 50 |
essential_modules = test_context.setup_shared_dependencies([]) |
| 51 |
|
| 52 |
debug_mock = essential_modules["orca.debug"] |
| 53 |
debug_mock.print_tokens = test_context.Mock() |
| 54 |
debug_mock.LEVEL_INFO = 800 |
| 55 |
|
| 56 |
messages_mock = essential_modules["orca.messages"] |
| 57 |
messages_mock.CURRENT_DATE = "current date" |
| 58 |
messages_mock.CURRENT_TIME = "current time" |
| 59 |
messages_mock.CURRENT_LOCATION = "current location" |
| 60 |
messages_mock.CURRENT_PAGE = "current page" |
| 61 |
messages_mock.CURRENT_STEP = "current step" |
| 62 |
messages_mock.CURRENT_ITEM = "current item" |
| 63 |
|
| 64 |
ax_object_class_mock = test_context.Mock() |
| 65 |
ax_object_class_mock.has_state = test_context.Mock(return_value=False) |
| 66 |
ax_object_class_mock.get_state_set = test_context.Mock() |
| 67 |
|
| 68 |
def mock_get_attribute(obj, attr, default=None): # pylint: disable=unused-argument |
| 69 |
return default |
| 70 |
|
| 71 |
ax_object_class_mock.get_attribute = test_context.Mock(side_effect=mock_get_attribute) |
| 72 |
ax_object_class_mock.get_role = test_context.Mock(return_value=Atspi.Role.UNKNOWN) |
| 73 |
essential_modules["orca.ax_object"].AXObject = ax_object_class_mock |
| 74 |
|
| 75 |
return essential_modules |
| 76 |
|
| 77 |
@pytest.mark.parametrize( |
| 78 |
"case", |
| 79 |
[ |
| 80 |
{"id": "enabled", "method_name": "is_enabled", "state_type": Atspi.StateType.ENABLED}, |
| 81 |
{ |
| 82 |
"id": "editable", |
| 83 |
"method_name": "is_editable", |
| 84 |
"state_type": Atspi.StateType.EDITABLE, |
| 85 |
}, |
| 86 |
{ |
| 87 |
"id": "selected", |
| 88 |
"method_name": "is_selected", |
| 89 |
"state_type": Atspi.StateType.SELECTED, |
| 90 |
}, |
| 91 |
{"id": "visible", "method_name": "is_visible", "state_type": Atspi.StateType.VISIBLE}, |
| 92 |
{"id": "pressed", "method_name": "is_pressed", "state_type": Atspi.StateType.PRESSED}, |
| 93 |
], |
| 94 |
ids=lambda case: case["id"], |
| 95 |
) |
| 96 |
def test_common_state_methods(self, test_context, case: dict) -> None: |
| 97 |
"""Test AXUtilitiesState common state methods.""" |
| 98 |
|
| 99 |
essential_modules: dict[str, MagicMock] = self._setup_dependencies(test_context) |
| 100 |
mock_ax_object_class = essential_modules["orca.ax_object"].AXObject |
| 101 |
from orca.ax_utilities_state import AXUtilitiesState |
| 102 |
|
| 103 |
mock_obj = test_context.Mock(spec=Atspi.Accessible) |
| 104 |
method = getattr(AXUtilitiesState, case["method_name"]) |
| 105 |
mock_ax_object_class.has_state = test_context.Mock( |
| 106 |
side_effect=lambda obj, state: state == case["state_type"], |
| 107 |
) |
| 108 |
assert method(mock_obj) |
| 109 |
mock_ax_object_class.has_state = test_context.Mock( |
| 110 |
side_effect=lambda obj, state: state != case["state_type"], |
| 111 |
) |
| 112 |
assert not method(mock_obj) |
| 113 |
|
| 114 |
@pytest.mark.parametrize( |
| 115 |
"case", |
| 116 |
[ |
| 117 |
{ |
| 118 |
"id": "not_active", |
| 119 |
"is_active": False, |
| 120 |
"attribute_value": None, |
| 121 |
"expected_result": "", |
| 122 |
}, |
| 123 |
{ |
| 124 |
"id": "active_no_attribute", |
| 125 |
"is_active": True, |
| 126 |
"attribute_value": None, |
| 127 |
"expected_result": "", |
| 128 |
}, |
| 129 |
{ |
| 130 |
"id": "date_attribute", |
| 131 |
"is_active": True, |
| 132 |
"attribute_value": "date", |
| 133 |
"expected_result": "current date", |
| 134 |
}, |
| 135 |
{ |
| 136 |
"id": "time_attribute", |
| 137 |
"is_active": True, |
| 138 |
"attribute_value": "time", |
| 139 |
"expected_result": "current time", |
| 140 |
}, |
| 141 |
{ |
| 142 |
"id": "location_attribute", |
| 143 |
"is_active": True, |
| 144 |
"attribute_value": "location", |
| 145 |
"expected_result": "current location", |
| 146 |
}, |
| 147 |
{ |
| 148 |
"id": "page_attribute", |
| 149 |
"is_active": True, |
| 150 |
"attribute_value": "page", |
| 151 |
"expected_result": "current page", |
| 152 |
}, |
| 153 |
{ |
| 154 |
"id": "step_attribute", |
| 155 |
"is_active": True, |
| 156 |
"attribute_value": "step", |
| 157 |
"expected_result": "current step", |
| 158 |
}, |
| 159 |
{ |
| 160 |
"id": "unknown_attribute", |
| 161 |
"is_active": True, |
| 162 |
"attribute_value": "unknown", |
| 163 |
"expected_result": "current item", |
| 164 |
}, |
| 165 |
], |
| 166 |
ids=lambda case: case["id"], |
| 167 |
) |
| 168 |
def test_get_current_item_status_string( |
| 169 |
self, |
| 170 |
test_context: OrcaTestContext, |
| 171 |
case: dict, |
| 172 |
) -> None: |
| 173 |
"""Test AXUtilitiesState.get_current_item_status_string.""" |
| 174 |
|
| 175 |
essential_modules: dict[str, MagicMock] = self._setup_dependencies(test_context) |
| 176 |
mock_ax_object_class = essential_modules["orca.ax_object"].AXObject |
| 177 |
from orca.ax_utilities_state import AXUtilitiesState |
| 178 |
|
| 179 |
mock_obj = test_context.Mock(spec=Atspi.Accessible) |
| 180 |
test_context.patch_object(AXUtilitiesState, "is_active", return_value=case["is_active"]) |
| 181 |
mock_ax_object_class.get_attribute = test_context.Mock(return_value=case["attribute_value"]) |
| 182 |
result = AXUtilitiesState.get_current_item_status_string(mock_obj) |
| 183 |
assert result == case["expected_result"] |
| 184 |
|
| 185 |
@pytest.mark.parametrize( |
| 186 |
"case", |
| 187 |
[ |
| 188 |
{"id": "empty_state_set", "is_empty": True, "expected_result": True}, |
| 189 |
{"id": "non_empty_state_set", "is_empty": False, "expected_result": False}, |
| 190 |
], |
| 191 |
ids=lambda case: case["id"], |
| 192 |
) |
| 193 |
def test_has_no_state(self, test_context: OrcaTestContext, case: dict) -> None: |
| 194 |
"""Test AXUtilitiesState.has_no_state.""" |
| 195 |
|
| 196 |
essential_modules: dict[str, MagicMock] = self._setup_dependencies(test_context) |
| 197 |
mock_ax_object_class = essential_modules["orca.ax_object"].AXObject |
| 198 |
from orca.ax_utilities_state import AXUtilitiesState |
| 199 |
|
| 200 |
mock_obj = test_context.Mock(spec=Atspi.Accessible) |
| 201 |
mock_ax_object_class.get_state_set = test_context.Mock( |
| 202 |
return_value=test_context.Mock( |
| 203 |
is_empty=test_context.Mock(return_value=case["is_empty"]), |
| 204 |
), |
| 205 |
) |
| 206 |
assert AXUtilitiesState.has_no_state(mock_obj) == case["expected_result"] |
| 207 |
|
| 208 |
@pytest.mark.parametrize( |
| 209 |
"case", |
| 210 |
[ |
| 211 |
{"id": "has_checkable_state", "state_scenario": "checkable", "expected_result": True}, |
| 212 |
{"id": "has_checked_state", "state_scenario": "checked", "expected_result": True}, |
| 213 |
{"id": "no_relevant_state", "state_scenario": "none", "expected_result": False}, |
| 214 |
], |
| 215 |
ids=lambda case: case["id"], |
| 216 |
) |
| 217 |
def test_is_checkable(self, test_context: OrcaTestContext, case: dict) -> None: |
| 218 |
"""Test AXUtilitiesState.is_checkable.""" |
| 219 |
|
| 220 |
essential_modules: dict[str, MagicMock] = self._setup_dependencies(test_context) |
| 221 |
mock_ax_object_class = essential_modules["orca.ax_object"].AXObject |
| 222 |
from orca.ax_utilities_state import AXUtilitiesState |
| 223 |
|
| 224 |
mock_obj = test_context.Mock(spec=Atspi.Accessible) |
| 225 |
if case["state_scenario"] == "checkable": |
| 226 |
mock_ax_object_class.has_state = test_context.Mock( |
| 227 |
side_effect=lambda obj, state: state == Atspi.StateType.CHECKABLE, |
| 228 |
) |
| 229 |
elif case["state_scenario"] == "checked": |
| 230 |
mock_ax_object_class.has_state = test_context.Mock( |
| 231 |
side_effect=lambda obj, state: state == Atspi.StateType.CHECKED, |
| 232 |
) |
| 233 |
else: |
| 234 |
mock_ax_object_class.has_state = test_context.Mock(return_value=False) |
| 235 |
|
| 236 |
assert AXUtilitiesState.is_checkable(mock_obj) == case["expected_result"] |
| 237 |
|
| 238 |
@pytest.mark.parametrize( |
| 239 |
"case", |
| 240 |
[ |
| 241 |
{ |
| 242 |
"id": "checked_both_states", |
| 243 |
"method_name": "is_checked", |
| 244 |
"state_scenario": "both_states", |
| 245 |
"expected_result": True, |
| 246 |
"expects_debug": False, |
| 247 |
}, |
| 248 |
{ |
| 249 |
"id": "checked_checked_only", |
| 250 |
"method_name": "is_checked", |
| 251 |
"state_scenario": "checked_only", |
| 252 |
"expected_result": True, |
| 253 |
"expects_debug": True, |
| 254 |
}, |
| 255 |
{ |
| 256 |
"id": "checked_none", |
| 257 |
"method_name": "is_checked", |
| 258 |
"state_scenario": "none", |
| 259 |
"expected_result": False, |
| 260 |
"expects_debug": False, |
| 261 |
}, |
| 262 |
{ |
| 263 |
"id": "expandable_expandable", |
| 264 |
"method_name": "is_expandable", |
| 265 |
"state_scenario": "expandable", |
| 266 |
"expected_result": True, |
| 267 |
"expects_debug": False, |
| 268 |
}, |
| 269 |
{ |
| 270 |
"id": "expandable_expanded", |
| 271 |
"method_name": "is_expandable", |
| 272 |
"state_scenario": "expanded", |
| 273 |
"expected_result": True, |
| 274 |
"expects_debug": True, |
| 275 |
}, |
| 276 |
{ |
| 277 |
"id": "expandable_none", |
| 278 |
"method_name": "is_expandable", |
| 279 |
"state_scenario": "none", |
| 280 |
"expected_result": False, |
| 281 |
"expects_debug": False, |
| 282 |
}, |
| 283 |
{ |
| 284 |
"id": "expanded_both_states", |
| 285 |
"method_name": "is_expanded", |
| 286 |
"state_scenario": "both_states", |
| 287 |
"expected_result": True, |
| 288 |
"expects_debug": False, |
| 289 |
}, |
| 290 |
{ |
| 291 |
"id": "expanded_expanded_only", |
| 292 |
"method_name": "is_expanded", |
| 293 |
"state_scenario": "expanded_only", |
| 294 |
"expected_result": True, |
| 295 |
"expects_debug": True, |
| 296 |
}, |
| 297 |
{ |
| 298 |
"id": "expanded_none", |
| 299 |
"method_name": "is_expanded", |
| 300 |
"state_scenario": "none", |
| 301 |
"expected_result": False, |
| 302 |
"expects_debug": False, |
| 303 |
}, |
| 304 |
{ |
| 305 |
"id": "focusable_focusable", |
| 306 |
"method_name": "is_focusable", |
| 307 |
"state_scenario": "focusable", |
| 308 |
"expected_result": True, |
| 309 |
"expects_debug": False, |
| 310 |
}, |
| 311 |
{ |
| 312 |
"id": "focusable_focused", |
| 313 |
"method_name": "is_focusable", |
| 314 |
"state_scenario": "focused", |
| 315 |
"expected_result": True, |
| 316 |
"expects_debug": True, |
| 317 |
}, |
| 318 |
{ |
| 319 |
"id": "focusable_none", |
| 320 |
"method_name": "is_focusable", |
| 321 |
"state_scenario": "none", |
| 322 |
"expected_result": False, |
| 323 |
"expects_debug": False, |
| 324 |
}, |
| 325 |
{ |
| 326 |
"id": "focused_both_states", |
| 327 |
"method_name": "is_focused", |
| 328 |
"state_scenario": "both_states", |
| 329 |
"expected_result": True, |
| 330 |
"expects_debug": False, |
| 331 |
}, |
| 332 |
{ |
| 333 |
"id": "focused_focused_only", |
| 334 |
"method_name": "is_focused", |
| 335 |
"state_scenario": "focused_only", |
| 336 |
"expected_result": True, |
| 337 |
"expects_debug": True, |
| 338 |
}, |
| 339 |
{ |
| 340 |
"id": "focused_none", |
| 341 |
"method_name": "is_focused", |
| 342 |
"state_scenario": "none", |
| 343 |
"expected_result": False, |
| 344 |
"expects_debug": False, |
| 345 |
}, |
| 346 |
], |
| 347 |
ids=lambda case: case["id"], |
| 348 |
) |
| 349 |
def test_state_methods_with_debug(self, test_context: OrcaTestContext, case: dict) -> None: |
| 350 |
"""Test AXUtilitiesState methods that can trigger debug output.""" |
| 351 |
|
| 352 |
essential_modules: dict[str, MagicMock] = self._setup_dependencies(test_context) |
| 353 |
from orca import debug |
| 354 |
from orca.ax_object import AXObject |
| 355 |
from orca.ax_utilities_state import AXUtilitiesState |
| 356 |
|
| 357 |
mock_obj = test_context.Mock(spec=Atspi.Accessible) |
| 358 |
|
| 359 |
if case["method_name"] == "is_checked": |
| 360 |
if case["state_scenario"] == "both_states": |
| 361 |
test_context.patch_object( |
| 362 |
AXObject, |
| 363 |
"has_state", |
| 364 |
side_effect=lambda obj, state: state |
| 365 |
in (Atspi.StateType.CHECKED, Atspi.StateType.CHECKABLE), |
| 366 |
) |
| 367 |
elif case["state_scenario"] == "checked_only": |
| 368 |
test_context.patch_object( |
| 369 |
AXObject, |
| 370 |
"has_state", |
| 371 |
side_effect=lambda obj, state: state == Atspi.StateType.CHECKED, |
| 372 |
) |
| 373 |
elif case["method_name"] == "is_expandable": |
| 374 |
if case["state_scenario"] == "expandable": |
| 375 |
test_context.patch_object( |
| 376 |
AXObject, |
| 377 |
"has_state", |
| 378 |
side_effect=lambda obj, state: state == Atspi.StateType.EXPANDABLE, |
| 379 |
) |
| 380 |
elif case["state_scenario"] == "expanded": |
| 381 |
test_context.patch_object( |
| 382 |
AXObject, |
| 383 |
"has_state", |
| 384 |
side_effect=lambda obj, state: state == Atspi.StateType.EXPANDED, |
| 385 |
) |
| 386 |
elif case["method_name"] == "is_expanded": |
| 387 |
if case["state_scenario"] == "both_states": |
| 388 |
test_context.patch_object( |
| 389 |
AXObject, |
| 390 |
"has_state", |
| 391 |
side_effect=lambda obj, state: state |
| 392 |
in (Atspi.StateType.EXPANDED, Atspi.StateType.EXPANDABLE), |
| 393 |
) |
| 394 |
elif case["state_scenario"] == "expanded_only": |
| 395 |
test_context.patch_object( |
| 396 |
AXObject, |
| 397 |
"has_state", |
| 398 |
side_effect=lambda obj, state: state == Atspi.StateType.EXPANDED, |
| 399 |
) |
| 400 |
elif case["method_name"] == "is_focusable": |
| 401 |
if case["state_scenario"] == "focusable": |
| 402 |
test_context.patch_object( |
| 403 |
AXObject, |
| 404 |
"has_state", |
| 405 |
side_effect=lambda obj, state: state == Atspi.StateType.FOCUSABLE, |
| 406 |
) |
| 407 |
elif case["state_scenario"] == "focused": |
| 408 |
test_context.patch_object( |
| 409 |
AXObject, |
| 410 |
"has_state", |
| 411 |
side_effect=lambda obj, state: state == Atspi.StateType.FOCUSED, |
| 412 |
) |
| 413 |
elif case["method_name"] == "is_focused": |
| 414 |
if case["state_scenario"] == "both_states": |
| 415 |
test_context.patch_object( |
| 416 |
AXObject, |
| 417 |
"has_state", |
| 418 |
side_effect=lambda obj, state: state |
| 419 |
in (Atspi.StateType.FOCUSED, Atspi.StateType.FOCUSABLE), |
| 420 |
) |
| 421 |
elif case["state_scenario"] == "focused_only": |
| 422 |
test_context.patch_object( |
| 423 |
AXObject, |
| 424 |
"has_state", |
| 425 |
side_effect=lambda obj, state: state == Atspi.StateType.FOCUSED, |
| 426 |
) |
| 427 |
|
| 428 |
if case["state_scenario"] == "none": |
| 429 |
test_context.patch_object(AXObject, "has_state", return_value=False) |
| 430 |
|
| 431 |
if case["expects_debug"]: |
| 432 |
test_context.patch_object( |
| 433 |
debug, |
| 434 |
"print_tokens", |
| 435 |
new=essential_modules["orca.debug"].print_tokens, |
| 436 |
) |
| 437 |
|
| 438 |
method = getattr(AXUtilitiesState, case["method_name"]) |
| 439 |
assert method(mock_obj) == case["expected_result"] |
| 440 |
|
| 441 |
@pytest.mark.parametrize( |
| 442 |
"case", |
| 443 |
[ |
| 444 |
{"id": "hidden_true", "hidden_value": "true", "expected_result": True}, |
| 445 |
{"id": "hidden_false", "hidden_value": "false", "expected_result": False}, |
| 446 |
{"id": "hidden_none", "hidden_value": None, "expected_result": False}, |
| 447 |
], |
| 448 |
ids=lambda case: case["id"], |
| 449 |
) |
| 450 |
def test_is_hidden(self, test_context: OrcaTestContext, case: dict) -> None: |
| 451 |
"""Test AXUtilitiesState.is_hidden.""" |
| 452 |
|
| 453 |
essential_modules: dict[str, MagicMock] = self._setup_dependencies(test_context) |
| 454 |
mock_ax_object_class = essential_modules["orca.ax_object"].AXObject |
| 455 |
from orca.ax_utilities_state import AXUtilitiesState |
| 456 |
|
| 457 |
mock_obj = test_context.Mock(spec=Atspi.Accessible) |
| 458 |
mock_ax_object_class.get_attribute = test_context.Mock( |
| 459 |
side_effect=lambda obj, attr, default=None: case["hidden_value"] |
| 460 |
if attr == "hidden" |
| 461 |
else default, |
| 462 |
) |
| 463 |
assert AXUtilitiesState.is_hidden(mock_obj) == case["expected_result"] |
| 464 |
|
| 465 |
@pytest.mark.parametrize( |
| 466 |
"case", |
| 467 |
[ |
| 468 |
{ |
| 469 |
"id": "has_read_only_state", |
| 470 |
"read_only_scenario": "has_read_only_state", |
| 471 |
"expected_result": True, |
| 472 |
}, |
| 473 |
{"id": "is_editable", "read_only_scenario": "editable", "expected_result": False}, |
| 474 |
{ |
| 475 |
"id": "text_role_not_editable", |
| 476 |
"read_only_scenario": "text_role_not_editable", |
| 477 |
"expected_result": True, |
| 478 |
}, |
| 479 |
{ |
| 480 |
"id": "label_role_not_editable", |
| 481 |
"read_only_scenario": "label_role_not_editable", |
| 482 |
"expected_result": False, |
| 483 |
}, |
| 484 |
], |
| 485 |
ids=lambda case: case["id"], |
| 486 |
) |
| 487 |
def test_is_read_only(self, test_context: OrcaTestContext, case: dict) -> None: |
| 488 |
"""Test AXUtilitiesState.is_read_only.""" |
| 489 |
|
| 490 |
self._setup_dependencies(test_context) |
| 491 |
from orca.ax_object import AXObject |
| 492 |
from orca.ax_utilities_state import AXUtilitiesState |
| 493 |
|
| 494 |
mock_obj = test_context.Mock(spec=Atspi.Accessible) |
| 495 |
|
| 496 |
if case["read_only_scenario"] == "has_read_only_state": |
| 497 |
test_context.patch_object( |
| 498 |
AXObject, |
| 499 |
"has_state", |
| 500 |
side_effect=lambda obj, state: state == Atspi.StateType.READ_ONLY, |
| 501 |
) |
| 502 |
elif case["read_only_scenario"] == "editable": |
| 503 |
test_context.patch_object(AXObject, "has_state", return_value=False) |
| 504 |
test_context.patch_object(AXUtilitiesState, "is_editable", return_value=True) |
| 505 |
elif case["read_only_scenario"] == "text_role_not_editable": |
| 506 |
test_context.patch_object(AXObject, "has_state", return_value=False) |
| 507 |
test_context.patch_object(AXUtilitiesState, "is_editable", return_value=False) |
| 508 |
test_context.patch_object(AXObject, "get_role", return_value=Atspi.Role.TEXT) |
| 509 |
elif case["read_only_scenario"] == "label_role_not_editable": |
| 510 |
test_context.patch_object(AXObject, "has_state", return_value=False) |
| 511 |
test_context.patch_object(AXUtilitiesState, "is_editable", return_value=False) |
| 512 |
test_context.patch_object(AXObject, "get_role", return_value=Atspi.Role.LABEL) |
| 513 |
|
| 514 |
assert AXUtilitiesState.is_read_only(mock_obj) == case["expected_result"] |