Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
etch
nuages
Commits
269961b8
Commit
269961b8
authored
Jun 22, 2015
by
Christophe Siraut
Browse files
meetingpoll/tests: start testing views
parent
fa558779
Changes
1
Hide whitespace changes
Inline
Side-by-side
meetingpoll/tests.py
View file @
269961b8
from
django.core.urlresolvers
import
resolve
from
django.test
import
TestCase
from
django.test
import
TestCase
,
Client
from
meetingpoll.views
import
new
class
NewViewTest
(
TestCase
):
def
test_new_page_output
(
self
):
client
=
Client
()
response
=
client
.
get
(
'/m/new/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertIn
(
'<title>Create a meeting</title>'
,
response
.
content
)
self
.
assertTrue
(
response
.
content
.
startswith
(
'<!DOCTYPE html>
\n
<html>'
))
self
.
assertTrue
(
response
.
content
.
endswith
(
'</html>
\n
'
))
Write
Preview
Markdown
is supported
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