def METHOD_NAME(self):
    pkg_info, dist = self.create_dist()
    cmd = check(dist)
    # let's see if it detects broken rest
    broken_rest = 'title\n===\n\ntest'
    msgs = cmd._check_rst_data(broken_rest)
    self.assertEqual(len(msgs), 1)
    # and non-broken rest
    rest = 'title\n=====\n\ntest'
    msgs = cmd._check_rst_data(rest)
    self.assertEqual(len(msgs), 0)