Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
f3896cb2
Commit
f3896cb2
authored
Dec 03, 2015
by
Krophil
Browse files
SimpleTestCase -> TestCase. Now, test are almost ok
parent
50f53e7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/tests.py
View file @
f3896cb2
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
(
Simple
TestCase
):
class
PageHandlingTest
(
TestCase
):
def
setUp
(
self
):
try
:
Group
.
objects
.
create
(
name
=
"root"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment