mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-16 03:03:21 +00:00
Merge branch 'krophil'
This commit is contained in:
commit
2557af270a
@ -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.core.urlresolvers import reverse
|
||||||
from django.contrib.auth.models import Group
|
from django.contrib.auth.models import Group
|
||||||
|
|
||||||
from core.models import User
|
from core.models import User
|
||||||
#from core.views.forms import RegisteringForm, LoginForm
|
#from core.views.forms import RegisteringForm, LoginForm
|
||||||
|
|
||||||
class UserRegistrationTest(SimpleTestCase):
|
"""
|
||||||
|
to run these tests :
|
||||||
|
python3 manage.py test
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class UserRegistrationTest(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
try:
|
try:
|
||||||
Group.objects.create(name="root")
|
Group.objects.create(name="root")
|
||||||
@ -156,7 +163,7 @@ class UserRegistrationTest(SimpleTestCase):
|
|||||||
self.assertTrue(response.status_code == 200)
|
self.assertTrue(response.status_code == 200)
|
||||||
self.assertTrue('Please try again' in str(response.content))
|
self.assertTrue('Please try again' in str(response.content))
|
||||||
|
|
||||||
class PageHandlingTest(SimpleTestCase):
|
class PageHandlingTest(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
try:
|
try:
|
||||||
Group.objects.create(name="root")
|
Group.objects.create(name="root")
|
||||||
|
Loading…
Reference in New Issue
Block a user