# coding: utf-8
import json

from coveralls import Coveralls


def test_output_to_file(tmpdir):
    """Check we can write coveralls report into the file."""
    test_log = tmpdir.join('test.log')
    Coveralls(repo_token='xxx').save_report(test_log.strpath)
    report = test_log.read()

    assert json.loads(report)['repo_token'] == 'xxx'

@@ -21,16 +21,38 @@
 rt json%0A
+import os%0A%0Aimport mock
 %0Afrom co
@@ -78,16 +78,61 @@
 ralls%0A%0A%0A
+@mock.patch.dict(os.environ, %7B%7D, clear=True)%0A
 def test

fix broken test when repo token set in env