unittest.TestCase.assertRegexpMatches

TestCase.assertRegexpMatches(text, expected_regexp, msg=None)[source]

Fail the test unless the text matches the regular expression.