Commit 232a121e authored by Kirby Ezekiel Santos's avatar Kirby Ezekiel Santos

Created the first unit test for checking if the home page returns the correct html

parent fc166655
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class FroyoConfig(AppConfig):
name = 'froyo'
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
class HomePageTest(TestCase):
def test_home_page_returns_correct_html(self):
response = self.client.get('')
self.assertTemplateUsed(response, 'home_page.html')
from django.shortcuts import render
# Create your views here.
...@@ -31,6 +31,7 @@ ALLOWED_HOSTS = [] ...@@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
'froyo',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
......
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