Fakultas Ilmu Komputer UI

Commit 6ec9f934 authored by Agas Yanpratama's avatar Agas Yanpratama 💬
Browse files

Change Not to Use Post Because can invoke 403

parent b3105a65
Pipeline #28450 failed with stages
in 6 minutes and 6 seconds
......@@ -141,9 +141,8 @@ class DeleteItemTest(TestCase):
# Create Todo
newTodoItem = Item.objects.create(text='item 1', list=new_list)
self.client.post(
f'/lists/{new_list.id}/delete_item',
data={'todo_id': newTodoItem.id}
self.client.get(
f'/lists/{new_list.id}/delete_item/{newTodoItem.id}/'
)
self.assertEqual(Item.objects.all().count(), 0)
......@@ -154,9 +153,8 @@ class DeleteItemTest(TestCase):
# Create Todo
newTodoItem = Item.objects.create(text='item 1', list=new_list)
response = self.client.post(
f'/lists/{new_list.id}/delete_item',
data={'todo_id': newTodoItem.id}
response = self.client.get(
f'/lists/{new_list.id}/delete_item/{newTodoItem.id}/'
)
self.assertRedirects(response, f'/lists/{new_list.id}/')
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment