py2 compat issues 🤷

This commit is contained in:
Mr. Outis
2019-11-27 18:39:01 -06:00
parent 787ea9cd31
commit e69fffa7c7
4 changed files with 11 additions and 16 deletions
+2 -1
View File
@@ -2,13 +2,14 @@ import mock
import json
from dvc.main import main
from dvc.utils.compat import str
@mock.patch("dvc.analytics.send")
def test_daemon_analytics(mock_send, tmp_path):
report = {"name": "dummy report"}
fname = tmp_path / "report"
fname.write_text(json.dumps(report))
fname.write_text(str(json.dumps(report)))
assert 0 == main(["daemon", "analytics", str(fname)])
assert mock_send.called