Commit 692d80d7 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

todolists: Add test for overview and detail page

parent d8977b24
from django.contrib.auth.models import User
from django.test import TestCase
from todolists.models import Todolist
class TestTodolist(TestCase):
fixtures = ['main/fixtures/arches.json', 'main/fixtures/repos.json',
def setUp(self):
self.user = User.objects.create(username="joeuser", first_name="Joe",
last_name="User", email="")
self.todolist = Todolist.objects.create(name='Boost rebuild',
description='Boost 1.66 rebuid',
def test_todolist_overview(self):
response = self.client.get('/todo/')
self.assertEqual(response.status_code, 200)
self.assertIn(, response.content)
def test_todolist_detail(self):
response = self.client.get(self.todolist.get_absolute_url())
self.assertEqual(response.status_code, 200)
self.assertIn(, response.content)
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