Fixes template paths in views

This commit is contained in:
Mouse Reeve 2021-01-29 10:29:21 -08:00
parent b53ef73faf
commit cc5fedb1d1
4 changed files with 6 additions and 6 deletions

View file

@ -32,7 +32,7 @@ class BlockViews(TestCase):
request.user = self.local_user
result = view(request)
self.assertIsInstance(result, TemplateResponse)
self.assertEqual(result.template_name, 'blocks.html')
self.assertEqual(result.template_name, 'preferences/blocks.html')
self.assertEqual(result.status_code, 200)
def test_block_post(self):

View file

@ -24,5 +24,5 @@ class DirectMessageViews(TestCase):
request.user = self.local_user
result = view(request)
self.assertIsInstance(result, TemplateResponse)
self.assertEqual(result.template_name, 'direct_messages.html')
self.assertEqual(result.template_name, 'feed/direct_messages.html')
self.assertEqual(result.status_code, 200)

View file

@ -31,7 +31,7 @@ class LandingViews(TestCase):
request.user = self.local_user
result = view(request)
self.assertEqual(result.status_code, 200)
self.assertEqual(result.template_name, 'feed.html')
self.assertEqual(result.template_name, 'feed/feed.html')
request.user = self.anonymous_user
result = view(request)
@ -58,7 +58,7 @@ class LandingViews(TestCase):
request.user = self.local_user
result = view(request, 'local')
self.assertIsInstance(result, TemplateResponse)
self.assertEqual(result.template_name, 'feed.html')
self.assertEqual(result.template_name, 'feed/feed.html')
self.assertEqual(result.status_code, 200)

View file

@ -47,7 +47,7 @@ class StatusViews(TestCase):
is_api.return_value = False
result = view(request, 'mouse', status.id)
self.assertIsInstance(result, TemplateResponse)
self.assertEqual(result.template_name, 'status.html')
self.assertEqual(result.template_name, 'feed/status.html')
self.assertEqual(result.status_code, 200)
with patch('bookwyrm.views.status.is_api_request') as is_api:
@ -68,7 +68,7 @@ class StatusViews(TestCase):
is_api.return_value = False
result = view(request, 'mouse', status.id)
self.assertIsInstance(result, TemplateResponse)
self.assertEqual(result.template_name, 'status.html')
self.assertEqual(result.template_name, 'feed/status.html')
self.assertEqual(result.status_code, 200)
with patch('bookwyrm.views.status.is_api_request') as is_api: