Пример #1
0
 def setUp(self):
     self.marche = Marche.objects.create(polemploi_id='abc', montant_unitaire=1438, portage=0.2)
     self.prestaire = Prestataire.objects.create(nom='prestataire')
     self.site = Site.objects.create(prestataire=self.prestaire, nom="Site")
     self.chargeinsertion = ChargeInsertion.objects.create(nom='Lambert', prenom='Gerard')
     self.lc = LettreCommande.objects.create(marche=self.marche,
                                             charge_insertion=self.chargeinsertion,
                                             site=self.site,
                                             numero_lc='azerty',
                                             date_debut=datetime.date(day=12, month=11, year=2008),
                                             date_fin=datetime.date(day=20,  month=03, year=2009),
                                             civilite=1,
                                             nom='Doe',
                                             prenom='John',
                                             polemploi_id='qsdfg',
                                             ale_prescriptrice='Paris',
                                             conseiller_ploleemploi='Personne',
                                             avancement=models_etat.LC_EN_COURS)
     self.refDay = datetime.date(year=2009, month=02, day=12)
     self.lc_csvView = csvResponse.csvView(self.lc, self.refDay)
Пример #2
0
 def test_daysUsedYearbefore2(self):
     marche = Marche.objects.create(polemploi_id='abc', montant_unitaire=1438, portage=0.2)
     prestaire = Prestataire.objects.create(nom='prestataire')
     site = Site.objects.create(prestataire=prestaire, nom="Site")
     chargeinsertion = ChargeInsertion.objects.create(nom='Lambert', prenom='Gerard')
     lc = LettreCommande.objects.create(marche=marche,
                                             charge_insertion=chargeinsertion,
                                             site=site,
                                             numero_lc='azerty',
                                             date_debut=datetime.date(year=2008, month=11, day=12),
                                             date_fin=datetime.date(year=2009, month=03, day=20),
                                             civilite=1,
                                             nom='Doe',
                                             prenom='John',
                                             polemploi_id='qsdfg',
                                             ale_prescriptrice='Paris',
                                             conseiller_ploleemploi='Personne')
     
     refDay = datetime.date(year=2009, month=02, day=12)
     lc_csvView = csvResponse.csvView(lc, refDay)
     lc_csvDict = lc_csvView.csvDict() 
     self.assertEqual(49, self.lc_csvView.daysUsedYearbefore())