def tearDown(self):

        from django.conf import settings

        for searcher in get_available_search_engines():
            searcher.clear_cache()
        shutil.rmtree(settings.WIRECLOUD_INDEX_DIR, ignore_errors=True)

        LiveServerTestCase.tearDown(self)
        WirecloudRemoteTestCase.tearDown(self)
Exemple #2
0
    def tearDown(self):

        from django.conf import settings

        for searcher in get_available_search_engines():
            searcher.clear_cache()
        shutil.rmtree(settings.WIRECLOUD_INDEX_DIR, ignore_errors=True)

        LiveServerTestCase.tearDown(self)
        WirecloudRemoteTestCase.tearDown(self)
    def setUp(self):

        from django.core.cache import cache

        restoretree(self.localcatalogue_tmp_dir_backup, self.localcatalogue_tmp_dir)
        restoretree(self.catalogue_tmp_dir_backup, self.catalogue_tmp_dir)
        cache.clear()
        try:
            self.network._servers['http']['example.com'].clear()
        except:
            pass

        LiveServerTestCase.setUp(self)
        WirecloudRemoteTestCase.setUp(self)
Exemple #4
0
    def tearDown(self):

        from django.conf import settings
        if self.clear_search_indexes:
            management.call_command('clear_index', interactive=False, verbosity=0)

            # Reload the connection
            haystack.connections.connections_info = settings.HAYSTACK_CONNECTIONS
            haystack.connections.reload('default')

            time.sleep(0.2)

        LiveServerTestCase.tearDown(self)
        WirecloudRemoteTestCase.tearDown(self)
Exemple #5
0
    def setUp(self):

        from django.core.cache import cache

        restoretree(self.localcatalogue_tmp_dir_backup,
                    self.localcatalogue_tmp_dir)
        restoretree(self.catalogue_tmp_dir_backup, self.catalogue_tmp_dir)
        cache.clear()
        try:
            self.network._servers['http']['example.com'].clear()
        except:
            pass

        LiveServerTestCase.setUp(self)
        WirecloudRemoteTestCase.setUp(self)
Exemple #6
0
    def setUp(self):

        from django.core.cache import cache

        restoretree(self.localcatalogue_tmp_dir_backup,
                    self.localcatalogue_tmp_dir)
        restoretree(self.catalogue_tmp_dir_backup, self.catalogue_tmp_dir)
        cache.clear()
        try:
            self.network._servers['http']['example.com'].clear()
        except:
            pass

        LiveServerTestCase.setUp(self)
        WirecloudRemoteTestCase.setUp(self)
        management.call_command('populate', verbosity=0, interactive=False)
Exemple #7
0
    def tearDown(self):

        from django.conf import settings
        if self.clear_search_indexes:
            management.call_command('clear_index',
                                    interactive=False,
                                    verbosity=0)

            # Reload the connection
            haystack.connections.connections_info = settings.HAYSTACK_CONNECTIONS
            haystack.connections.reload('default')

            time.sleep(0.2)

        LiveServerTestCase.tearDown(self)
        WirecloudRemoteTestCase.tearDown(self)
Exemple #8
0
    def setUp(self):

        haystack.connections.reload('default')
        management.call_command('rebuild_index', interactive=False, verbosity=0)

        from django.core.cache import cache

        restoretree(self.localcatalogue_tmp_dir_backup, self.localcatalogue_tmp_dir)
        restoretree(self.catalogue_tmp_dir_backup, self.catalogue_tmp_dir)
        cache.clear()
        try:
            self.network._servers['http']['example.com'].clear()
        except:
            pass

        LiveServerTestCase.setUp(self)
        WirecloudRemoteTestCase.setUp(self)
        management.call_command('populate', verbosity=0, interactive=False)
Exemple #9
0
    def setUp(self):

        haystack.connections.reload('default')
        management.call_command('rebuild_index',
                                interactive=False,
                                verbosity=0)

        from django.core.cache import cache

        restoretree(self.localcatalogue_tmp_dir_backup,
                    self.localcatalogue_tmp_dir)
        restoretree(self.catalogue_tmp_dir_backup, self.catalogue_tmp_dir)
        cache.clear()
        try:
            self.network._servers['http']['example.com'].clear()
        except Exception:
            pass

        LiveServerTestCase.setUp(self)
        WirecloudRemoteTestCase.setUp(self)
        management.call_command('populate', verbosity=0, interactive=False)