"once_with to test with explicit parameters or an assertEqual with"
" call_count.")
- if 'cinder.functional/tests/' or 'cinder.unit/tests' in filename:
+ if 'cinder/tests/functional' or 'cinder/tests/unit' in filename:
pos = logical_line.find('.assert_called_once(')
if pos != -1:
yield (pos, msg)
def test_check_assert_called_once(self):
self.assertEqual(0, len(list(checks.check_assert_called_once(
- ".assert_called_with(", "cinder.tests.unit/test1.py"))))
+ ".assert_called_with(", "cinder/tests/unit/test1.py"))))
self.assertEqual(0, len(list(checks.check_assert_called_once(
".assert_called_with(", "cinder/blah.py"))))
self.assertEqual(1, len(list(checks.check_assert_called_once(
- ".assert_called_once(", "cinder.tests.unit/test1.py"))))
+ ".assert_called_once(", "cinder/tests/unit/test1.py"))))
self.assertEqual(0, len(list(checks.check_assert_called_once(
- ".assertEqual(", "cinder.tests.unit/test1.py"))))
+ ".assertEqual(", "cinder/tests/unit/test1.py"))))
def test_oslo_namespace_imports_check(self):
self.assertEqual(1, len(list(checks.check_oslo_namespace_imports(