Beispiel #1
0
    def get_tickets(self, query_string):
        """Wrapper around ``get_dicts()`` that returns ``Ticket`` instances.

        :param query_string: Starts with a slash, part of the URL between the
                             domain and the parameters (before the ?).
        """
        for ticket_dict in self.get_dicts(query_string):
            yield ticket.factory(ticket_dict)
Beispiel #2
0
    def get_tickets(self, query_string):
        """Wrapper around ``get_dicts()`` that returns ``Ticket`` instances.

        :param query_string: Starts with a slash, part of the URL between the
                             domain and the parameters (before the ?).
        """
        for ticket_dict in self.get_dicts(query_string):
            yield ticket.factory(ticket_dict)
Beispiel #3
0
    def test_ticket_factory_alt(self):
        t = ticket.factory({
            "ticket": "123",
            "_reporter": "douche",
        })

        self.assertEquals(t.id, 123)
        self.assertEquals(t.reporter, "douche")
Beispiel #4
0
    def test_ticket_factory_alt(self):
        t = ticket.factory({
            "ticket": "123",
            "_reporter": "douche",
        })

        self.assertEquals(t.id, 123)
        self.assertEquals(t.reporter, "douche")
Beispiel #5
0
    def test_ticket_factory(self):
        t = ticket.factory({
            "id": "245",
            "summary": "meh",
            "reporter": "douche",
            "description": "clean all the things",
        })

        self.assertEquals(t.id, 245)
        self.assertEquals(t.summary, "meh")
        self.assertEquals(t.reporter, "douche")
        self.assertEquals(t.description, "clean all the things")
Beispiel #6
0
    def test_ticket_factory(self):
        t = ticket.factory({
            "id": "245",
            "summary": "meh",
            "reporter": "douche",
            "description": "clean all the things",
        })

        self.assertEquals(t.id, 245)
        self.assertEquals(t.summary, "meh")
        self.assertEquals(t.reporter, "douche")
        self.assertEquals(t.description, "clean all the things")