コード例 #1
0
 def test_github(self):
     """Tests that project_src_path returns the correct result on GitHub."""
     os.environ['PROJECT_SRC_PATH'] = self.project_src_dir_name
     expected_project_src_path = os.path.join(self.workspace,
                                              self.project_src_dir_name)
     github_env = config_utils.GithubEnvironment()
     self.assertEqual(github_env.project_src_path,
                      expected_project_src_path)
コード例 #2
0
 def test_unset(self):
     """Tests that project_src_path returns None when no PROJECT_SRC_PATH is
 set."""
     github_env = config_utils.GithubEnvironment()
     self.assertIsNone(github_env.project_src_path)
コード例 #3
0
 def setUp(self):
     test_helpers.patch_environ(self)
     self.repo_owner = 'repo-owner'
     self.repo_name = 'repo-name'
     self.github_env = config_utils.GithubEnvironment()
     self.generic_ci_env = config_utils.GenericCiEnvironment()