Self hosted FLOSS fitness/workout, nutrition and weight tracker
Self review changes
Tom Bowyerefef8151f2ff
diff --git a/wger/core/tests/api_base_test.py b/wger/core/tests/api_base_test.pyindex 7a90e2224..6946b9ff9 100644--- a/wger/core/tests/api_base_test.py+++ b/wger/core/tests/api_base_test.py@@ -160,7 +160,7 @@ class ApiGetTestCase(object):def test_get_overview_is_cached(self):"""- Test accessing the overview view of a resource+ Test accessing the overview view of a resource is cached"""# Ensure the wger cache is empty.cache_length = len(locmem._caches['wger-cache'])diff --git a/wger/exercises/api/views.py b/wger/exercises/api/views.pyindex 41a0275cf..b536a3018 100644--- a/wger/exercises/api/views.py+++ b/wger/exercises/api/views.py@@ -67,7 +67,7 @@ from wger.utils.permissions import CreateOnlyPermissionlogger = logging.getLogger(__name__)-exerciseCacheTTL = 60 * 60 # One hour+exercise_cache_TTL = 60 * 60 # One hourclass ExerciseBaseViewSet(viewsets.ReadOnlyModelViewSet):"""@@ -105,7 +105,7 @@ class ExerciseViewSet(viewsets.ReadOnlyModelViewSet):'name',)- @method_decorator(cache_page(exerciseCacheTTL))+ @method_decorator(cache_page(exercise_cache_TTL))def dispatch(self, request, *args, **kwargs):return super().dispatch(request, *args, **kwargs)@@ -229,7 +229,7 @@ class ExerciseInfoViewset(viewsets.ReadOnlyModelViewSet):'license_author',)- @method_decorator(cache_page(exerciseCacheTTL))+ @method_decorator(cache_page(exercise_cache_TTL))def dispatch(self, request, *args, **kwargs):return super().dispatch(request, *args, **kwargs)@@ -253,7 +253,7 @@ class ExerciseBaseInfoViewset(viewsets.ReadOnlyModelViewSet):'license_author',)- @method_decorator(cache_page(exerciseCacheTTL))+ @method_decorator(cache_page(exercise_cache_TTL))def dispatch(self, request, *args, **kwargs):return super().dispatch(request, *args, **kwargs)diff --git a/wger/exercises/tests/test_exercise.py b/wger/exercises/tests/test_exercise.pyindex 8241ee927..694b615cc 100644--- a/wger/exercises/tests/test_exercise.py+++ b/wger/exercises/tests/test_exercise.py@@ -18,7 +18,6 @@ import json# Djangofrom django.core import mailfrom django.core.cache import cache-from django.core.cache.backends import locmemfrom django.core.cache.utils import make_template_fragment_keyfrom django.template import (Context,@@ -26,9 +25,6 @@ from django.template import ()from django.urls import reverse-# Third Party-from rest_framework import status-# wgerfrom wger.core.tests import api_base_testfrom wger.core.tests.base_testcase import (