summaryrefslogtreecommitdiff
path: root/service/test/integration/test_feedback_service.py
blob: dd32374edda8d9e5811e60e47aced2ba980a186f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os
import unittest
from mockito import when
from twisted.internet import defer
from test.support.integration import AppTestClient


class TestFeedbackService(unittest.TestCase, AppTestClient):
    @defer.inlineCallbacks
    def test_open_ticket(self):
        yield self.start_client()
        self.feedback_service.FEEDBACK_URL = "https://dev.pixelated-project.org/tickets"
        when(self.leap_session).account_email().thenReturn("text@pixelated-project.org")
        response = self.feedback_service.open_ticket("Pixelated is awesome!")

        self.assertEquals(response.status_code, 200)