Chapter3.5 Wrote application, created lists/views.py

This commit is contained in:
Jason Zhu 2020-11-06 12:32:21 +11:00
parent 6db53bce69
commit ff9370e0ca
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,9 @@
from django.test import TestCase
from django.urls import resolve
from lists.views import home_page
class SmokeTest(TestCase):
class HomePageTest(TestCase):
def test_bad_maths(self):
self.assertEqual(1+1,3)
def test_root_url_resolves_to_home_page_view(self):
found = resolve('/')
self.assertEqual(found.func, home_page)

View File

@ -1,3 +1,3 @@
from django.shortcuts import render
# Create your views here.
home_page = None