diff --git a/tests/unit/test_updater.py b/tests/unit/test_updater.py index d68e33d0a..92dc3b037 100644 --- a/tests/unit/test_updater.py +++ b/tests/unit/test_updater.py @@ -48,10 +48,14 @@ def test_is_outdated(latest, current, result, updater): @pytest.mark.skipif( os.getenv("TRAVIS_EVENT_TYPE") != "cron", reason = "Only run on travis CRON to avoid generating too much logs" -def test_check(updater, monkeypatch): - monkeypatch.setenv("DVC_TEST", "true") - monkeypatch.delenv("CI") +) +@mock.patch("dvc.updater.Updater._check") +def test_check(mock_check, updater, monkeypatch): + monkeypatch.delenv("CI", None) + monkeypatch.setenv("DVC_TEST", False) updater.check() updater.check() updater.check() + + assert mock_check.call_count == 3