Skip to content

Commit 8a14700

Browse files
author
Mr. Outis
committed
tests/updater: fix problems with .check
1 parent 4b833f5 commit 8a14700

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/unit/test_updater.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ def test_is_outdated(latest, current, result, updater):
4848
@pytest.mark.skipif(
4949
os.getenv("TRAVIS_EVENT_TYPE") != "cron",
5050
reason = "Only run on travis CRON to avoid generating too much logs"
51-
def test_check(updater, monkeypatch):
52-
monkeypatch.setenv("DVC_TEST", "true")
53-
monkeypatch.delenv("CI")
51+
)
52+
@mock.patch("dvc.updater.Updater._check")
53+
def test_check(mock_check, updater, monkeypatch):
54+
monkeypatch.delenv("CI", None)
55+
monkeypatch.setenv("DVC_TEST", False)
5456

5557
updater.check()
5658
updater.check()
5759
updater.check()
60+
61+
assert mock_check.call_count == 3

0 commit comments

Comments
 (0)