def test_page_should_contain_all_strings_fails(mocker: MockerFixture,
                                               under_test: x3270):
    mocker.patch("Mainframe3270.py3270.Emulator.string_get",
                 return_value=["def"])

    with pytest.raises(Exception, match='The string "ghi" was not found'):
        under_test.page_should_contain_all_strings(["def", "ghi"])
def test_page_should_contain_all_strings_ignore_case(mocker: MockerFixture,
                                                     under_test: x3270):
    mocker.patch("Mainframe3270.py3270.Emulator.string_get",
                 side_effect=["AbC", "DeF"])

    under_test.page_should_contain_all_strings(["abc", "def"],
                                               ignore_case=True)
def test_page_should_contain_all_strings_custom_message(
        mocker: MockerFixture, under_test: x3270):
    mocker.patch("Mainframe3270.py3270.Emulator.string_get",
                 return_value="abc")

    with pytest.raises(Exception, match="my error message"):
        under_test.page_should_contain_all_strings(
            ["abc", "def"], error_message="my error message")