nova/nova/hacking
Davanum Srinivas 45553a6dda mock.assert_called_once() is not a valid method
mock.assert_called_once() is a no-op that tests nothing.  Instead
with mock.assert_called_once_with() should be used (or use
assertEqual(1, mock_obj.call_count) if you don't want to check
parameters).

Add a new HACKING rule for nova to prevent assert_called_once()
usage from creeping in.

Closes-Bug: #1365751

Change-Id: I1055093a1c31792b6411a3cd46c80b8bcaaf78c1
2014-09-16 16:38:49 -04:00
..
__init__.py Switch to flake8+hacking. 2013-05-17 12:54:12 -07:00
checks.py mock.assert_called_once() is not a valid method 2014-09-16 16:38:49 -04:00