diff --git a/bookshare/core/tests.py b/bookshare/core/tests.py index 7ce503c2dd97ba78597f6ff6e4393132753573f6..4699e3f15d6b3abc939093aadc73c749bcf04c8e 100644 --- a/bookshare/core/tests.py +++ b/bookshare/core/tests.py @@ -1,3 +1,19 @@ 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('')) + self.assertIn('user.get_full_name', response.content) + self.assertTrue(response.content.endswith('')) -# Create your tests here.