def bilan(self, request, queryset): (bool, msg) = querySetValidator(queryset).oneEntreEnPresta() if bool: lc = queryset.get() response = HttpResponse(mimetype='application/pdf') response['Content-Disposition'] = 'attachment; filename=bilan_'\ + (lc.numero_lc and lc.numero_lc or '_')\ +'.pdf' bilanDoc(response, lc).buildDoc() return response self.message_user(request, msg)
def test_961(self): # No LC number bug response = HttpResponse() bilanDoc(response, LettreCommande.objects.get(pk=961)).buildDoc() self.assertTrue(True)
def test_3030(self): # Ok no Bug response = HttpResponse() bilanDoc(response, LettreCommande.objects.get(pk=3030)).buildDoc() self.assertTrue(True)
def test_315(self): # '&' bug response = HttpResponse() bilanDoc(response, LettreCommande.objects.get(pk=315)).buildDoc() self.assertTrue(True)