Example #1
0
    def test_prefix_project(self):
        prefix_project = PrefixProject('URID', None)
        prefix_project.url_prefix = 'https://github.com/anvatar/URID'

        self._git_repo.t_add_project(prefix_project)

        response = self.client.get(reverse('urid:project_detail', args=('URID',)))

        self.assertContains(response, 'URID', status_code=200)
        self.assertContains(response, 'https://github.com/anvatar/URID')
Example #2
0
    def test_get_projects_prefix_project(self):
        os.mkdir(os.path.join(self._repo_path, 'DIR'))
        open(os.path.join(self._repo_path, 'FILE'), 'w').close()

        self._create_base_file()

        expected_project = PrefixProject('WELC', self._project_file_path())
        expected_project.url_prefix = 'https://github.com/welc/welc-201507'
        expected_project.tickets[1] = self._ticket1
        expected_project.tickets[2] = self._ticket2

        self.assertListEqual(git_repo().get_projects(), [expected_project])