def title_contains(title):
    """ An expectation for checking that the title contains a case-sensitive
    substring. title is the fragment of title expected
    returns True when the title matches, False otherwise
    """
    def _predicate(driver):
        return title in driver.title

    return _predicate