From f3896cb22ef8159884a094d90dc849af24bfa08a Mon Sep 17 00:00:00 2001 From: Krophil Date: Thu, 3 Dec 2015 18:41:22 +0100 Subject: [PATCH] SimpleTestCase -> TestCase. Now, test are almost ok --- core/tests.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/tests.py b/core/tests.py index 59f17978..8f2815b4 100644 --- a/core/tests.py +++ b/core/tests.py @@ -1,11 +1,18 @@ -from django.test import SimpleTestCase, Client +from django.test import SimpleTestCase, Client, TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import Group from core.models import User #from core.views.forms import RegisteringForm, LoginForm -class UserRegistrationTest(SimpleTestCase): +""" +to run these tests : + python3 manage.py test +""" + + + +class UserRegistrationTest(TestCase): def setUp(self): try: Group.objects.create(name="root") @@ -156,7 +163,7 @@ class UserRegistrationTest(SimpleTestCase): self.assertTrue(response.status_code == 200) self.assertTrue('Please try again' in str(response.content)) -class PageHandlingTest(SimpleTestCase): +class PageHandlingTest(TestCase): def setUp(self): try: Group.objects.create(name="root")