Use call_count instead of .assert_called_once()

assert_called_once doesn't exist (only assert_called_once_with and
assert_called_with).

Also, fix some tests that were wrong because of this issue.

Change-Id: I6b681215c9e86c8c822ee46b16bff53d3a26460a