Do not use deprecated assertRaisesRegexp()

The unit test log ends up with DeprecationWarning(s) from the outdated
calls to assertRaisesRegexp. We should switch to using assertRaisesRegex
instead. This commit eliminates these warnings from the log and the hacking
rule N344 ensures that folks don't end up adding fresh code down the line
with the outdated assertRaisesRegexp as well

Partial-Bug: #1407736

Change-Id: Ifba672f7568d5159c63bf88c534812e4e3a26d5a
This commit is contained in:
Davanum Srinivas 2015-01-08 11:38:28 -05:00
parent 518c579dec
commit d73117eb4d
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ Nova Specific Commandments
- [N333] Check for oslo library imports use the non-namespaced packages
- [N334] Change assertTrue/False(A in/not in B, message) to the more specific
assertIn/NotIn(A, B, message)
- [N335] Check for usage of deprecated assertRaisesRegexp
Creating Unit Tests
-------------------