Add hacking check to prevent assert_called_once

We've had a few patches now over the last few releases to fix invalid
mock assertions for assert_called_once. Rather than keep letting these
creep back in to the code, this adds a hacking check to watch for this
specific call and block it.

Change-Id: I3cf4df523ddba49f57dd1d4d23e95e6d62d03c9e
This commit is contained in:
Sean McGinnis
2016-05-23 09:29:43 -05:00
parent 44c397cbd3
commit 9400cee06f
3 changed files with 17 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ Cinder Specific Commandments
- [C311] Check for proper naming and usage in option registration.
- [C312] Check that assertIsNone(value) is used and not assertEqual(None, value).
- [C313] Check that assertTrue(value) is used and not assertEqual(True, value).
- [C314] Check for use of invalid mock.assert_called_once().
General
-------