Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Collection of Practice
2019
1606876052-practice
Commits
eb08bd38
Commit
eb08bd38
authored
Sep 18, 2019
by
Rayza Arasj Mahardhika
Browse files
change unit test for checking full name in homepage
parent
941043c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
lists/tests.py
View file @
eb08bd38
...
...
@@ -16,7 +16,7 @@ class HomePageTest(TestCase):
html
=
response
.
content
.
decode
(
'utf8'
)
self
.
assertTrue
(
html
.
startswith
(
'<html>'
))
self
.
assertIn
(
'<title>Rayza
\'
s Homepage</title>'
,
html
)
self
.
assertIn
(
'<h1>
W
el
co
me
to
Rayza
\'
s Homepage
</h1>'
,
html
)
self
.
assertIn
(
'<h1>
H
el
lo, my na
me
is
Rayza
Arasj Mahardhika
</h1>'
,
html
)
self
.
assertTrue
(
html
.
endswith
(
'</html>'
))
class
AboutPageTest
(
TestCase
):
...
...
@@ -31,6 +31,8 @@ class AboutPageTest(TestCase):
html
=
response
.
content
.
decode
(
'utf8'
)
self
.
assertTrue
(
html
.
startswith
(
'<html>'
))
self
.
assertIn
(
'<title>Rayza
\'
s About Page</title>'
,
html
)
self
.
assertIn
(
'<h1>He
llo, my name is Rayza Arasj Mahardhika
</h1>'
,
html
)
self
.
assertIn
(
'<h1>He
re
\'
s a few facts about me
</h1>'
,
html
)
self
.
assertIn
(
'<p>I
\'
m 21 years old</p>'
,
html
)
self
.
assertIn
(
'<p>I
\'
m from Bogor</p>'
,
html
)
self
.
assertIn
(
'<p>I
\'
m currently studying Computer Science at Faculty of Computer Science, Universitas Indonesia</p>'
,
html
)
self
.
assertTrue
(
html
.
endswith
(
'</html>'
))
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