fix tests for ZA
authorOlivier Larchevêque <olivier.larcheveque@auf.org>
Fri, 28 Sep 2012 14:28:42 +0000 (10:28 -0400)
committerOlivier Larchevêque <olivier.larcheveque@auf.org>
Fri, 28 Sep 2012 14:28:42 +0000 (10:28 -0400)
project/rh/test/common.py
project/rh/test/rapport.py

index 643229e..cadadb6 100644 (file)
@@ -159,10 +159,12 @@ class RhTest(TestCase):
         # Régions / Implantations
         #########################
         self.REGION_ACGL = ref.Region.objects.get(id=1)
+        self.ZA_ACGL = ref.ZoneAdministrative.objects.get(code=u'ACGL')
         self.IMPLANTATION_ACGL_CNF_NGAOUNDERE = ref.Implantation.objects.get(id=90)
         self.IMPLANTATION_ACGL_CNF_BANGUI = ref.Implantation.objects.get(id=85)
 
         self.REGION_BAP = ref.Region.objects.get(id=4)
+        self.ZA_BAP = ref.ZoneAdministrative.objects.get(code=u'AP')
         self.IMPLANTATION_BAP_BUREAU = ref.Implantation.objects.get(id=51)
         self.IMPLANTATION_BAP_IFI = ref.Implantation.objects.get(id=55)
 
index 69e3454..e14d503 100644 (file)
@@ -430,7 +430,7 @@ class RapportMasseSalarialeCalculTest(RhTest):
         self.assertEqual(len(resp.context['lignes']), 1)
 
         params = {
-                'region': self.REGION_ACGL.id,
+                'zone_administrative': self.ZA_ACGL.code,
                 'annee': self.today.year,
                 }
         resp = self.client.get(self.url, params)