Browse Source

VPN tests: delete objects from LDAP after the tests

Baptiste Jonglez 11 years ago
parent
commit
0040f5c8dc
1 changed files with 5 additions and 0 deletions
  1. 5 0
      coin/vpn/tests.py

+ 5 - 0
coin/vpn/tests.py

@@ -38,6 +38,11 @@ class VPNTestCase(TestCase):
         vpn.full_clean()
         vpn.save()
 
+    def tearDown(self):
+        """Properly clean up objects, so that they don't stay in LDAP"""
+        VPNSubscription.objects.get().delete()
+        Member.objects.get().delete()
+
     def test_has_ipv4_endpoint(self):
         vpn = VPNSubscription.objects.get()
         self.assertIsNotNone(vpn.ipv4_endpoint)