def test_attribute_error_content():
    """should raise AttributeError with right content"""
    with pytest.raises(AttributeError) as e:
        the_list = ElementList([Person(), Person()])
        the_list.talk()

    expected_message = "'ElementList' object has no attribute 'talk'"
    assert expected_message == str(e.value)
should raise AttributeError with right content
tests/tests_splinter/test_element_list.py