def render_index(request): """Controller for WatchDog index""" navpath = [('Home', '/'), ('WatchDog', )] context = { 'navpath': navpath, 'title': create_title(navpath), 'tests': get_statuses() } return render(request, 'watchdog/base.html', context)
def render_index(request): """Controller for WatchDog index""" navpath = [("Home", "/"), ("WatchDog", )] context = { "navpath": navpath, "title": create_title(navpath), "tests": get_statuses(), } return render(request, "watchdog/base.html", context)
def get_context_data(self, **kwargs): context = super(WatchDogWidget, self).get_context_data(**kwargs) context['tests'] = [t for t in get_statuses() if t.status != STATUS_OK] return context
def test_get_status_cache_does_not_raise(): """Regression test for issue where pickle cache is poisoned from cross-environment testing - get_statuses() cache handling was bad """ assert get_statuses()