def assertMessageHasHeaders(self, message, headers):
if isinstance(message, bytes):<EOL><INDENT>message = message_from_bytes(message)<EOL><DEDENT>msg_headers = set(message.items())<EOL>self.assertTrue(headers.issubset(msg_headers), msg='<STR_LIT>'<EOL>'<STR_LIT>' % (headers - msg_headers),)<EOL>
Asserts that the `message` has all `headers`.

message: can be an instance of an email.Message subclass or a string
         with the contents of an email message.
headers: should be a set of (header-name, header-value) tuples.