mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-06 07:18:28 +01:00
16 lines
377 B
Python
16 lines
377 B
Python
import mock
|
|
import json
|
|
|
|
from dvc.main import main
|
|
from dvc.utils.compat import fspath
|
|
|
|
|
|
@mock.patch("dvc.analytics.send")
|
|
def test_daemon_analytics(mock_send, tmp_path):
|
|
report = {"name": "dummy report"}
|
|
fname = tmp_path / "report"
|
|
fname.write_text(str(json.dumps(report)))
|
|
|
|
assert 0 == main(["daemon", "analytics", fspath(fname)])
|
|
assert mock_send.called
|