Fakultas Ilmu Komputer UI

Commit ee53307a authored by Rayza Arasj Mahardhika's avatar Rayza Arasj Mahardhika
Browse files

Merge branch 'exercise/homepage'

parents 8bc89603 70f0c1f4
Pipeline #20025 passed with stage
in 2 minutes and 1 second
......@@ -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>Welcome to Rayza\'s Homepage</h1>', html)
self.assertIn('<h1>Hello, my name 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>Hello, my name is Rayza Arasj Mahardhika</h1>', html)
self.assertIn('<h1>Here\'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>'))
......@@ -4,7 +4,7 @@ def home_page(request):
return HttpResponse(
'<html>' +
'<title>Rayza\'s Homepage</title>' +
'<h1>Welcome to Rayza\'s Homepage</h1>' +
'<h1>Hello, my name is Rayza Arasj Mahardhika</h1>' +
'</html>'
)
......@@ -12,7 +12,9 @@ def about_page(request):
return HttpResponse(
'<html>' +
'<title>Rayza\'s About Page</title>' +
'<h1>Hello, my name is Rayza Arasj Mahardhika</h1>' +
'<h1>Here\'s a few facts about me</h1>' +
'<p>I\'m 21 years old</p>' +
'<p>I\'m from Bogor</p>' +
'<p>I\'m currently studying Computer Science at Faculty of Computer Science, Universitas Indonesia</p>' +
'</html>'
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment