tests: analytics, use dir helpers

This commit is contained in:
Mr. Outis
2019-12-12 18:16:10 -06:00
parent fd62ba840d
commit 7426a62baa
+2 -1
View File
@@ -14,7 +14,8 @@ def test_daemon_analytics(mock_send, tmp_path):
@mock.patch("dvc.analytics.collect_and_send_report")
@mock.patch("dvc.analytics.is_enabled", return_value=True)
def test_main_analytics(mock_is_enabled, mock_report, dvc_repo):
def test_main_analytics(mock_is_enabled, mock_report, tmp_dir, dvc):
tmp_dir.gen("foo")
assert 0 == main(["add", "foo"])
assert mock_is_enabled.called
assert mock_report.called