Self hosted FLOSS fitness/workout, nutrition and weight tracker
Fix tests
Roland Geiderd5928e8b41cb
diff --git a/wger/core/tests/api_base_test.py b/wger/core/tests/api_base_test.pyindex 62235483d..2a0a35759 100644--- a/wger/core/tests/api_base_test.py+++ b/wger/core/tests/api_base_test.py@@ -175,9 +175,8 @@ class ApiGetTestCase(object):# If the overview is cached. Then ensure the cache isn't empty.if self.overview_cached:- pass- # cache_length = len(locmem._caches['wger-cache'])- # self.assertNotEqual(cache_length, 0)+ cache_length = len(locmem._caches['wger-cache'])+ self.assertNotEqual(cache_length, 0)else:cache_length = len(locmem._caches['wger-cache'])self.assertEqual(cache_length, 0)diff --git a/wger/core/tests/test_language.py b/wger/core/tests/test_language.pyindex 111035fc6..4018619aa 100644--- a/wger/core/tests/test_language.py+++ b/wger/core/tests/test_language.py@@ -98,3 +98,4 @@ class LanguageApiTestCase(api_base_test.ApiBaseResourceTestCase):pk = 1resource = Languageprivate_resource = False+ overview_cached = Truediff --git a/wger/exercises/tests/test_categories.py b/wger/exercises/tests/test_categories.pyindex 4614b6e3b..c4ea2e678 100644--- a/wger/exercises/tests/test_categories.py+++ b/wger/exercises/tests/test_categories.py@@ -134,3 +134,4 @@ class ExerciseCategoryApiTestCase(api_base_test.ApiBaseResourceTestCase):pk = 2resource = ExerciseCategoryprivate_resource = False+ overview_cached = Truediff --git a/wger/exercises/tests/test_equipment.py b/wger/exercises/tests/test_equipment.pyindex d90f84d47..19db358c7 100644--- a/wger/exercises/tests/test_equipment.py+++ b/wger/exercises/tests/test_equipment.py@@ -182,3 +182,4 @@ class EquipmentApiTestCase(api_base_test.ApiBaseResourceTestCase):pk = 1resource = Equipmentprivate_resource = False+ overview_cached = Truediff --git a/wger/exercises/tests/test_exercise_images.py b/wger/exercises/tests/test_exercise_images.pyindex 14115946f..2394d5f87 100644--- a/wger/exercises/tests/test_exercise_images.py+++ b/wger/exercises/tests/test_exercise_images.py@@ -154,3 +154,4 @@ class ExerciseImagesApiTestCase(pk = 1private_resource = Falseresource = ExerciseImage+ overview_cached = Truediff --git a/wger/exercises/tests/test_muscles.py b/wger/exercises/tests/test_muscles.pyindex 2b1630124..2b29e0fe0 100644--- a/wger/exercises/tests/test_muscles.py+++ b/wger/exercises/tests/test_muscles.py@@ -152,6 +152,7 @@ class MuscleApiTestCase(api_base_test.ApiBaseResourceTestCase):pk = 1resource = Muscleprivate_resource = False+ overview_cached = Truedata = {'name': 'The name', 'is_front': True, 'name_en': 'name en'}def test_get_detail(self):diff --git a/wger/utils/constants.py b/wger/utils/constants.pyindex 7c60b4f5b..65a35a414 100644--- a/wger/utils/constants.py+++ b/wger/utils/constants.py@@ -42,9 +42,7 @@ DATE_FORMATS = [# Allowed tags, attributes and styles allowed in textareas edited with a JS# editor. Everything not in these whitelists is stripped.HTML_TAG_WHITELIST = ('b', 'i', 'strong', 'em', 'ul', 'ol', 'li', 'p')-HTML_ATTRIBUTES_WHITELIST = {'*': 'style'}-HTML_STYLES_WHITELIST = ('text-decoration', )# Pagination