def test_identite(self): indiv = IndividuFactory.create() self.assertEqual(indiv.identite(), "{} {} {}".format(indiv.lib_nom_pat_ind, indiv.lib_nom_usu_ind, indiv.lib_pr1_ind))
def test_get_code_secret(self): indiv = IndividuFactory.create() d = { # cod_etu: get_code_secret 14511970: '6879', 14511502: '6494', 10270047: '3071', } for k, v in d.iteritems(): indiv.cod_etu = k self.assertEqual(v, indiv.get_code_secret())
def test_ine(self): indiv = IndividuFactory.create() d = { # cod_nne_ind: cod_cle_nne_ind '2596027058': 'S', '2598052337': 'G', '0G4145005D': '3', } for k, v in d.iteritems(): indiv.cod_nne_ind = k indiv.cod_cle_nne_ind = v self.assertEqual(indiv.ine(), "{}{}".format(k, v))
def test_get_adresse_html(self): indiv = IndividuFactory.create_individu_with_two_adresses() self.assertIsNotNone(indiv.get_adresse_html())
def test_get_full_adresse(self): indiv = IndividuFactory.create_individu_with_two_adresses() self.assertIsNotNone(indiv.get_full_adresse(2014))
def test_get_code_postal(self): indiv = IndividuFactory.create_individu_with_two_adresses() self.assertIsNone(indiv.get_code_postal(2014))
def test_get_adresse(self): indiv = IndividuFactory.create_individu_with_two_adresses() self.assertEqual(list, type(indiv.get_adresse(2014)))
def test_get_adresse_fixe(self): indiv = IndividuFactory.create_individu_with_two_adresses() self.assertIsNotNone(indiv.get_adresse_fixe()['lib_pay'])
def test_individu_adresse(self): indiv = IndividuFactory.create() self.assertEqual("", indiv.get_full_adresse(2010)) indiv = IndividuFactory.create_individu_with_two_adresses() indiv = Individu.objects.get(pk=indiv.pk) self.assertNotEqual('', indiv.get_full_adresse(2010))
def test_individu_create(self): indiv = IndividuFactory.create_individu_with_two_adresses() self.assertEqual(1, Individu.objects.count()) self.assertEqual(2, Adresse.objects.count())
def test_indvidu_build(self): IndividuFactory.build()
def test_get_etiquette(self): indiv = IndividuFactory.create() self.assertIsNone(indiv.get_etiquette())
def setUp(self): IndividuFactory.create_individu_with_two_adresses()