def tearDown(self): super(GeoNodeLiveTestSupport, self).tearDown() logging.info(" Test tearDown. Destroying models / Cleaning up Server.") remove_models(self.get_obj_ids, type=self.get_type) from django.conf import settings if settings.OGC_SERVER['default'].get("GEOFENCE_SECURITY_ENABLED", False): from geonode.security.utils import purge_geofence_all purge_geofence_all()
def tearDown(self): super(GeoNodeBaseTestSupport, self).tearDown() logging.info(" Test tearDown. Destroying models / Cleaning up Server.") remove_models(self.get_obj_ids, type=self.get_type) from django.conf import settings if settings.OGC_SERVER['default'].get( "GEOFENCE_SECURITY_ENABLED", False): from geonode.security.utils import purge_geofence_all purge_geofence_all()
def tearDown(self): connections.databases['default']['ATOMIC_REQUESTS'] = False for temp_file in self._tempfiles: os.unlink(temp_file) # Cleanup if settings.OGC_SERVER['default'].get( "GEOFENCE_SECURITY_ENABLED", False): from geonode.security.utils import purge_geofence_all purge_geofence_all()
def tearDown(self): connections.databases['default']['ATOMIC_REQUESTS'] = False map(os.unlink, self._tempfiles) # Cleanup Upload.objects.all().delete() Layer.objects.all().delete() Map.objects.all().delete() Document.objects.all().delete() if settings.OGC_SERVER['default'].get("GEOFENCE_SECURITY_ENABLED", False): from geonode.security.utils import purge_geofence_all purge_geofence_all()
def tearDown(self): # super(MonitoringTestBase, self).setUp() map(os.unlink, self._tempfiles) # Cleanup Layer.objects.all().delete() Map.objects.all().delete() Document.objects.all().delete() from django.conf import settings if settings.OGC_SERVER['default'].get("GEOFENCE_SECURITY_ENABLED", False): from geonode.security.utils import purge_geofence_all purge_geofence_all()
def tearDown(self): connections.databases['default']['ATOMIC_REQUESTS'] = False for temp_file in self._tempfiles: os.unlink(temp_file) # Cleanup try: with transaction.atomic(): Upload.objects.all().delete() Layer.objects.all().delete() Map.objects.all().delete() Document.objects.all().delete() except Exception as e: logger.error(e) if settings.OGC_SERVER['default'].get("GEOFENCE_SECURITY_ENABLED", False): from geonode.security.utils import purge_geofence_all purge_geofence_all()