def setup_method(self, method):
     super(TestDroneEnvironment, self).setup_method(self)
     os.environ['DRONE'] = 'true'
     os.environ['DRONE_COMMIT'] = 'drone-commit-sha'
     os.environ['DRONE_BRANCH'] = 'drone-branch'
     os.environ['CI_PULL_REQUEST'] = '123'
     self.environment = percy.Environment()
 def setup_method(self, method):
     super(TestGitlabEnvironment, self).setup_method(self)
     os.environ['GITLAB_CI'] = 'true'
     os.environ['CI_COMMIT_SHA'] = 'gitlab-commit-sha'
     os.environ['CI_COMMIT_REF_NAME'] = 'gitlab-branch'
     os.environ['CI_JOB_ID'] = 'gitlab-job-id'
     os.environ['CI_JOB_STAGE'] = 'test'
     self.environment = percy.Environment()
示例#3
0
 def setup_method(self, method):
     super(TestJenkinsEnvironment, self).setup_method(self)
     os.environ['JENKINS_URL'] = 'http://localhost:8080/'
     os.environ['ghprbPullId'] = '123'
     os.environ['ghprbTargetBranch'] = 'jenkins-target-branch'
     os.environ['ghprbActualCommit'] = 'jenkins-commit-sha'
     os.environ['GIT_COMMIT'] = 'jenkins-commit-sha-from-git-plugin'
     self.environment = percy.Environment()
 def setup_method(self, method):
     super(TestJenkinsEnvironment, self).setup_method(self)
     os.environ['JENKINS_URL'] = 'http://localhost:8080/'
     os.environ['BUILD_NUMBER'] = 'jenkins-build-number'
     os.environ['ghprbSourceBranch'] = 'jenkins-source-branch'
     os.environ['ghprbActualCommit'] = 'jenkins-commit-sha'
     os.environ['GIT_COMMIT'] = 'jenkins-commit-sha-from-git-plugin'
     self.environment = percy.Environment()
 def setup_method(self, method):
     super(TestBuildkiteEnvironment, self).setup_method(self)
     os.environ['BUILDKITE'] = 'true'
     os.environ['BUILDKITE_COMMIT'] = 'buildkite-commit-sha'
     os.environ['BUILDKITE_BRANCH'] = 'buildkite-branch'
     os.environ['BUILDKITE_PULL_REQUEST'] = 'false'
     os.environ['BUILDKITE_BUILD_ID'] = 'buildkite-build-id'
     os.environ['BUILDKITE_PARALLEL_JOB_COUNT'] = '2'
     self.environment = percy.Environment()
示例#6
0
 def setup_method(self, method):
     super(TestCodeshipEnvironment, self).setup_method(self)
     os.environ['CI_NAME'] = 'codeship'
     os.environ['CI_BRANCH'] = 'codeship-branch'
     os.environ['CI_BUILD_NUMBER'] = 'codeship-build-number'
     os.environ['CI_PULL_REQUEST'] = 'false'  # This is always false on Codeship, unfortunately.
     os.environ['CI_COMMIT_ID'] = 'codeship-commit-sha'
     os.environ['CI_NODE_TOTAL'] = '3'
     self.environment = percy.Environment()
 def setup_method(self, method):
     super(TestSemaphoreEnvironment, self).setup_method(self)
     os.environ['SEMAPHORE'] = 'true'
     os.environ['BRANCH_NAME'] = 'semaphore-branch'
     os.environ['REVISION'] = 'semaphore-commit-sha'
     os.environ['SEMAPHORE_BRANCH_ID'] = 'semaphore-branch-id'
     os.environ['SEMAPHORE_BUILD_NUMBER'] = 'semaphore-build-number'
     os.environ['SEMAPHORE_THREAD_COUNT'] = '2'
     os.environ['PULL_REQUEST_NUMBER'] = '123'
     self.environment = percy.Environment()
 def setup_method(self, method):
     super(TestTravisEnvironment, self).setup_method(self)
     os.environ['TRAVIS_BUILD_ID'] = '1234'
     os.environ['TRAVIS_BUILD_NUMBER'] = 'travis-build-number'
     os.environ['TRAVIS_PULL_REQUEST'] = 'false'
     os.environ['TRAVIS_PULL_REQUEST_BRANCH'] = 'false'
     os.environ['TRAVIS_COMMIT'] = 'travis-commit-sha'
     os.environ['TRAVIS_BRANCH'] = 'travis-branch'
     os.environ['CI_NODE_TOTAL'] = '3'
     self.environment = percy.Environment()
示例#9
0
 def setup_method(self, method):
     super(TestCircleEnvironment, self).setup_method(self)
     os.environ['CIRCLECI'] = 'true'
     os.environ['CIRCLE_BRANCH'] = 'circle-branch'
     os.environ['CIRCLE_SHA1'] = 'circle-commit-sha'
     os.environ['CIRCLE_PROJECT_USERNAME'] = '******'
     os.environ['CIRCLE_PROJECT_REPONAME'] = 'repo-name'
     os.environ['CIRCLE_BUILD_NUM'] = 'circle-build-number'
     os.environ['CIRCLE_NODE_TOTAL'] = '3'
     os.environ['CI_PULL_REQUESTS'] = 'https://github.com/owner/repo-name/pull/123'
     self.environment = percy.Environment()
 def setup_method(self, method):
     super(TestCircleEnvironment, self).setup_method(self)
     os.environ['CIRCLECI'] = 'true'
     os.environ['CIRCLE_BRANCH'] = 'circle-branch'
     os.environ['CIRCLE_SHA1'] = 'circle-commit-sha'
     os.environ['CIRCLE_BUILD_NUM'] = 'circle-build-number'
     os.environ[
         'CIRCLE_WORKFLOW_WORKSPACE_ID'] = 'circle-workflow-workspace-id'
     os.environ['CIRCLE_NODE_TOTAL'] = '3'
     os.environ[
         'CI_PULL_REQUESTS'] = 'https://github.com/owner/repo-name/pull/123'
     self.environment = percy.Environment()
示例#11
0
    def setUp(self):
        config = percy.Config(access_token='foo')
        environment = percy.Environment()

        self.percy_connection = connection.Connection(config, environment)
 def setup_method(self, method):
     super(TestNoEnvironment, self).setup_method(self)
     self.environment = percy.Environment()
示例#13
0
 def setUp(self):
     self.config = percy.Config(access_token='foo')
     self.environment = percy.Environment()