def setUp(self): self.addon = Addon.objects.create(slug='x', type=1) self.func = mock.Mock() self.func.return_value = mock.sentinel.OK self.view = dec.addon_view(self.func) self.request = mock.Mock() self.slug_path = '/addon/%s/reviews' % self.addon.slug self.request.path = self.id_path = '/addon/%s/reviews' % self.addon.id self.request.GET = {}
def setUp(self): self.addon = Addon.objects.create(slug='x', type=1) self.func = mock.Mock() self.func.return_value = mock.sentinel.OK self.view = dec.addon_view(self.func) self.request = mock.Mock() self.slug_path = '/addon/%s/reviews' % self.addon.slug self.request.path = self.id_path = '/addon/%s/reviews' % self.addon.id self.request.GET = {}