New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 690595 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Fix unittest assert_not_called

Project Member Reported by nxia@chromium.org, Feb 9 2017

Issue description

Mock supports assert_not_called, but MagicMock doesn't. Fix the current unittests which use wrong assert methods.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/64da568a229c259c6554175f0b7980cdc39840d9

commit 64da568a229c259c6554175f0b7980cdc39840d9
Author: Ningning Xia <nxia@chromium.org>
Date: Fri Feb 10 04:48:50 2017

Change MagicMock.assert_not_called() to MagicMock.called

MagicMock does not support default assert_not_called() method, so it
just returns another MagicMock when MagicMock.assert_not_called() is
called. Change all MagicMock.assert_not_called() to
assertFalse(MagicMock.called).

BUG= chromium:690595 
TEST=unit_tests

Change-Id: Id4a66db87792b9695a31eb9571d09550fbfe01a5
Reviewed-on: https://chromium-review.googlesource.com/440364
Commit-Ready: Ningning Xia <nxia@chromium.org>
Tested-by: Ningning Xia <nxia@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/64da568a229c259c6554175f0b7980cdc39840d9/lib/ts_mon_config_unittest.py
[modify] https://crrev.com/64da568a229c259c6554175f0b7980cdc39840d9/cbuildbot/repository_unittest.py

Comment 2 by nxia@chromium.org, Feb 10 2017

Status: Fixed (was: Untriaged)

Comment 3 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 4 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 5 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 6 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment