Skip to content

Commit

Permalink
Remove test for deleted view
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandgeider committed Nov 14, 2024
1 parent 59dda5f commit 0fc1c35
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions wger/manager/tests/test_day.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,51 +112,6 @@ class EditWorkoutDayTestCase(WgerEditTestCase):
data = {'description': 'a different description', 'day': [1, 4]}


class RenderWorkoutDayTestCase(WgerTestCase):
"""
Tests rendering a single workout day
"""

def render_day(self, fail=False):
"""
Helper function to test rendering a single workout day
"""

# Fetch the day edit page
response = self.client.get(reverse('manager:day:view', kwargs={'id': 5}))

if fail:
self.assertIn(response.status_code, (302, 404))
self.assertTemplateUsed('login.html')

else:
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed('day/view.html')

def test_render_day_anonymous(self):
"""
Test rendering a single workout day as an anonymous user
"""

self.render_day(fail=True)

def test_render_workout_owner(self):
"""
Test rendering a single workout day as the owner user
"""

self.user_login('test')
self.render_day(fail=False)

def test_render_workout_other(self):
"""
Test rendering a single workout day as a different logged in user
"""

self.user_login('admin')
self.render_day(fail=True)


class WorkoutCacheTestCase(WgerTestCase):
"""
Workout cache test case
Expand Down Expand Up @@ -201,7 +156,6 @@ def test_day_id_property(self):
day = Day.objects.get(pk=3)
self.assertEqual(day.get_first_day_id, 1)


# class DayApiTestCase(api_base_test.ApiBaseResourceTestCase):
# """
# Tests the day API resource
Expand Down

0 comments on commit 0fc1c35

Please sign in to comment.