mirror of
https://github.com/TrentSPalmer/trentpalmerdotorg.git
synced 2024-11-22 01:21:30 -08:00
update audio/tests/test_confirm_delete_feed_view.py add function
test_confirm_delete_feed_view_get()
This commit is contained in:
parent
d397d59c06
commit
48b3c5cb04
@ -22,6 +22,22 @@ class TestConfirmDeleteFeedViewTestCase(TestCase):
|
|||||||
qs = Feed.objects.filter(title="Short Stories Mark Twain")
|
qs = Feed.objects.filter(title="Short Stories Mark Twain")
|
||||||
self.assertEquals(len(qs), 1)
|
self.assertEquals(len(qs), 1)
|
||||||
|
|
||||||
|
def test_confirm_delete_feed_view_get(self):
|
||||||
|
feed_a = Feed.objects.get(title="Short Stories Mark Twain")
|
||||||
|
self.client.login(username='user_b', password='password_user_b')
|
||||||
|
kw_args = {'pk': feed_a.pk}
|
||||||
|
response = self.client.get(reverse(
|
||||||
|
'audio:confirm_delete_feed', kwargs=kw_args))
|
||||||
|
self.assertEquals(response.status_code, 200)
|
||||||
|
self.assertTemplateUsed(response, 'audio/delete_feed_confirmation.html')
|
||||||
|
qs = Feed.objects.filter(title="Short Stories Mark Twain")
|
||||||
|
self.assertEquals(len(qs), 1)
|
||||||
|
qs = Episode.objects.filter(title="Mark Twain On Girls")
|
||||||
|
self.assertEquals(len(qs), 1)
|
||||||
|
qs = Episode.objects.filter(title="Mark Twain The Bee")
|
||||||
|
self.assertEquals(len(qs), 1)
|
||||||
|
self.assertEquals(response.request['PATH_INFO'], f'/confirm-delete-feed/{feed_a.pk}')
|
||||||
|
|
||||||
def test_confirm_delete_feed_view(self):
|
def test_confirm_delete_feed_view(self):
|
||||||
feed_a = Feed.objects.get(title="Short Stories Mark Twain")
|
feed_a = Feed.objects.get(title="Short Stories Mark Twain")
|
||||||
self.client.login(username='user_b', password='password_user_b')
|
self.client.login(username='user_b', password='password_user_b')
|
||||||
|
Loading…
Reference in New Issue
Block a user