def test_list_repos_with_one_override(self): override_repo('github.com/app/a', self.temp_specs_path) list_repos() self._assert_listed_repos(self.last_client_output, [['github.com/app/a', self.temp_specs_path], ['github.com/app/b', False]], offset=1)
def test_list_repos_with_no_overrides(self): list_repos() self._assert_listed_repos(self.last_client_output, [['github.com/app/a', False]]) self._assert_listed_repos(self.last_client_output, [['github.com/app/b', False]], offset=2)
def test_list_repos_with_one_override(self): override_repo('github.com/app/a', self.temp_specs_path) list_repos() self._assert_listed_repos(self.last_client_output, [['github.com/app/a', self.temp_specs_path]]) self._assert_listed_repos(self.last_client_output, [['github.com/app/b', False]], offset=2)
def test_override_repo_colon(self): bad_path = os.path.join(self.temp_specs_path, 'colon:path') os.makedirs(bad_path) with self.assertRaises(RuntimeError): override_repo('github.com/app/a', bad_path) list_repos() self._assert_listed_repos(self.last_client_output, [['github.com/app/a', False], ['github.com/app/b', False]], offset=1)
def test_override_repo_colon(self): bad_path = os.path.join(self.temp_specs_path, 'colon:path') os.makedirs(bad_path) with self.assertRaises(RuntimeError): override_repo('github.com/app/a', bad_path) list_repos() self._assert_listed_repos(self.last_client_output, [['github.com/app/a', False]]) self._assert_listed_repos(self.last_client_output, [['github.com/app/b', False]], offset=2)
def test_list_repos_with_no_overrides(self): list_repos() self._assert_listed_repos(self.last_client_output, [['github.com/app/a', False], ['github.com/app/b', False]], offset=1)