def update_cache_for_url(url): if settings.ENABLED: selector = SelectedBackend() return selector.backend.update_url(url) return False
def test_default_backend(self): s = SelectedBackend() self.assertTrue(isinstance(s.backend, PrerenderIO))
def test_override_backend(self): s = SelectedBackend() self.assertTrue(isinstance(s.backend, TestBackend))
def update_cache_for_url(url): if getattr(settings, "SEO_JS_ENABLED", not settings.DEBUG): selector = SelectedBackend() return selector.backend.update_url(url) return False