Skip to content

Commit

Permalink
Added no_config tests for CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam Costello authored and coagulant committed Oct 4, 2015
1 parent fd3712b commit 0f0e46b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_api.py
Expand Up @@ -85,6 +85,15 @@ def test_misconfigured(self):
assert str(excinfo.value) == 'You have to provide either repo_token in .coveralls.mock, or launch via Travis ' \
'or CircleCI'

@patch.dict(os.environ, {'CIRCLECI': 'True',
'CIRCLE_BUILD_NUM': '888',
'CI_PULL_REQUEST': 'https://github.com/org/repo/pull/9999'}, clear=True)
def test_circleci_no_config(self):
cover = Coveralls()
assert cover.config['service_name'] == 'circle-ci'
assert cover.config['service_job_id'] == '888'
assert cover.config['service_pull_request'] == '9999'


class Git(GitBasedTest):

Expand Down

0 comments on commit 0f0e46b

Please sign in to comment.