Commit b81c9733 authored by Daniel W Bond's avatar Daniel W Bond

beginning of test cases for core app

parent 430bbb67
from django.test import TestCase from django.test import TestCase
from django.http import HttpRequest
from django.core.urlresolvers import resolve
from .models import Student
from .views import DetailStudent, StudentRatings
class ProfileTest(TestCase):
def test_username_resolves_to_profile(self):
found = resolve('/student/username/')
self.assertEqual(found.func, home_page)
request = HttpResponse()
reponse = profile(request)
self.assertTrue(response.content.startswith('<html>'))
self.assertIn('<title>user.get_full_name</title>', response.content)
self.assertTrue(response.content.endswith('</html>'))
# Create your tests here.
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