コード例 #1
0
 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)
コード例 #2
0
ファイル: bilantest.py プロジェクト: cazino/Formation
 def test_961(self):
     # No LC number bug
     response = HttpResponse()
     bilanDoc(response, LettreCommande.objects.get(pk=961)).buildDoc()
     self.assertTrue(True)
コード例 #3
0
ファイル: bilantest.py プロジェクト: cazino/Formation
 def test_3030(self):
     # Ok no Bug
     response = HttpResponse()
     bilanDoc(response, LettreCommande.objects.get(pk=3030)).buildDoc()
     self.assertTrue(True)
コード例 #4
0
ファイル: bilantest.py プロジェクト: cazino/Formation
 def test_315(self):
     # '&' bug
     response = HttpResponse()
     bilanDoc(response, LettreCommande.objects.get(pk=315)).buildDoc()
     self.assertTrue(True)