Parcourir la source

Fix VPN tests

Baptiste Jonglez il y a 10 ans
Parent
commit
10a1bba798
1 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 5 5
      coin/vpn/tests.py

+ 5 - 5
coin/vpn/tests.py

@@ -26,15 +26,15 @@ class VPNTestCase(TestCase):
         abo = OfferSubscription(offer=self.offer, member=self.member)
         abo.full_clean()
         abo.save()
-        v6 = IPSubnet(ip_pool=self.v6_pool, offer_subscription=abo)
+        vpn = VPNConfiguration(offersubscription=abo)
+        vpn.full_clean()
+        vpn.save()
+        v6 = IPSubnet(ip_pool=self.v6_pool, configuration=vpn)
         v6.full_clean()
         v6.save()
-        v4 = IPSubnet(ip_pool=self.v4_pool, offer_subscription=abo)
+        v4 = IPSubnet(ip_pool=self.v4_pool, configuration=vpn)
         v4.full_clean()
         v4.save()
-        vpn = VPNConfiguration(offersubscription=abo)
-        vpn.full_clean()
-        vpn.save()
 
         # Create additional VPN, they should automatically be attributed a
         # new login.