mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-11 15:28:27 +01:00
tests/updater: fix problems with .check
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user