def METHOD_NAME(self):
    """
    Ensure that this function converts the value passed to bytes before
    attempting to encode, avoiding a UnicodeEncodeError on Python 2 and a
    TypeError on Python 3.
    """
    self.assertEqual(salt.utils.hashutils.md5_digest(self.str), self.str_md5)
    self.assertEqual(salt.utils.hashutils.md5_digest(self.bytes), self.bytes_md5)