Fakultas Ilmu Komputer UI

Commit 4a0036d9 authored by Rani Lasma Uli's avatar Rani Lasma Uli
Browse files

test for mutant1 failed, because URL hasn't been set

parent 3aa57176
......@@ -69,6 +69,28 @@ class ListViewTest(TestCase):
html = response.content.decode('utf8')
self.assertIn("oh tidak", html)
def test_to_kill_Index_mutant1(self):
Item.objects.all().delete()
response = self.client.get(TO_DO_LIST_URL + '/mutant1')
html = response.content.decode('utf8')
self.assertIn("yey, waktunya berlibur", html)
for x in range(0,4):
Item.objects.create(text='itemey '+str(x))
# 4 items
# response = self.client.get(TO_DO_LIST_URL)
# html = response.content.decode('utf8')
# self.assertIn("sibuk tapi santai", html)
Item.objects.create(text='itemey 5')
response = self.client.get(TO_DO_LIST_URL + "/mutant1")
html = response.content.decode('utf8')
# expected contains "oh tidak"
# self.assertIn("oh tidak", html)
self.assertFalse("oh tidak" in html)
......
......@@ -52,7 +52,7 @@ def index_mutant2(request):
message = "yey, waktunya berlibur"
# [mutant operation] mutant of items.count() < 5
elif items.count() =< 5:
elif items.count() <= 5:
message = "sibuk tapi santai"
return render(request, 'to-do-list.html', {
......
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