Example #1
0
    def test_basic_response(self):
        group = Group.objects.all()[0]

        response = self.client.get(CreateRedmineIssue.get_url(group.pk))
        self.assertEquals(response.status_code, 200)
        self.assertTemplateUsed(response,
                                'sentry/plugins/redmine/create_issue.html')
Example #2
0
    def test_http_auth_issue_creation(self):
        conf.REDMINE_USERNAME = '******'
        conf.REDMINE_PASSWORD = '******'

        group = GroupedMessage.objects.all()[0]

        response = self.client.post(CreateRedmineIssue.get_url(group.pk), {
            'subject': 'test',
            'description': 'foo',
        }, follow=True)
        self.assertEquals(response.status_code, 200)
        self.assertTemplateUsed(response, 'sentry/group/details.html')
        
        self.assertTrue(RedmineIssue.objects.filter(group=group).exists())
        
        group = GroupedMessage.objects.get(pk=group.pk)
        self.assertTrue(group.data['redmine']['issue_id'] > 0)
Example #3
0
    def test_http_auth_issue_creation(self):
        conf.REDMINE_USERNAME = '******'
        conf.REDMINE_PASSWORD = '******'

        group = Group.objects.all()[0]

        response = self.client.post(CreateRedmineIssue.get_url(group.pk), {
            'subject': 'test',
            'description': 'foo',
        },
                                    follow=True)
        self.assertEquals(response.status_code, 200)
        self.assertTemplateUsed(response, 'sentry/groups/details.html')

        self.assertTrue(RedmineIssue.objects.filter(group=group).exists())

        group = Group.objects.get(pk=group.pk)
        self.assertTrue(group.data['redmine']['issue_id'] > 0)
Example #4
0
    def test_basic_response(self):
        group = GroupedMessage.objects.all()[0]

        response = self.client.get(CreateRedmineIssue.get_url(group.pk))
        self.assertEquals(response.status_code, 200)
        self.assertTemplateUsed(response, 'sentry/plugins/redmine/create_issue.html')