Fakultas Ilmu Komputer UI

Commit 55481f85 authored by Rani Lasma Uli's avatar Rani Lasma Uli
Browse files

fix test to kill mutant

parent de601397
......@@ -25,7 +25,6 @@ class ListViewTest(TestCase):
def test_can_save_a_POST_request(self):
response = self.client.post(TO_DO_LIST_URL, data={'item_text': 'A new list item'})
self.assertEqual(Item.objects.count(), 1)
new_item = Item.objects.first()
self.assertEqual(new_item.text, 'A new list item')
......@@ -37,6 +36,11 @@ class ListViewTest(TestCase):
self.assertEqual(response.status_code, 302)
self.assertEqual(response['location'], TO_DO_LIST_URL)
def test_GET_will_return_ok_response(self):
response = self.client.get(TO_DO_LIST_URL)
self.assertEqual(response.status_code, 200)
self.assertFalse('location' in response)
def test_only_saves_items_when_necessary(self):
self.assertEqual(Item.objects.count(), 0)
Supports Markdown
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