'Asserts that the logger was called when signature
verification failed on a SafeCookieData object,
either because of a parse error or a cryptographic
failure.
The sig_error_string is the expected additional
context logged with the error.'

@contextmanager
def assert_signature_error_logged(self, sig_error_string):

    with self.assert_logged(('SafeCookieData    signature    error    .*|test_session_id|.*:    ' + sig_error_string)):
        (yield)
