Fakultas Ilmu Komputer UI
Skip to content
GitLab
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
7a095fab
Commit
7a095fab
authored
Sep 17, 2019
by
Rayza Arasj Mahardhika
Browse files
firest unit test and url mapping, dummy view
parent
731a8032
Changes
3
Hide whitespace changes
Inline
Side-by-side
lists/tests.py
View file @
7a095fab
from
django.urls
import
resolve
from
django.test
import
TestCase
from
lists.views
import
home_page
class
Smoket
est
(
TestCase
):
class
HomePageT
est
(
TestCase
):
def
test_bad_maths
(
self
):
self
.
assertEqual
(
1
+
1
,
3
)
def
test_root_url_resolves_to_home_page_view
(
self
):
found
=
resolve
(
'/'
)
self
.
assertEqual
(
found
.
func
,
home_page
)
lists/views.py
View file @
7a095fab
from
django.shortcuts
import
render
# Create your views here.
def
home_page
():
pass
superlists/urls.py
View file @
7a095fab
...
...
@@ -15,7 +15,9 @@ Including another URLconf
"""
from
django.contrib
import
admin
from
django.urls
import
path
from
lists.views
import
home_page
urlpatterns
=
[
path
(
'admin/'
,
admin
.
site
.
urls
),
# path('admin/', admin.site.urls),
path
(
''
,
home_page
,
name
=
'home'
)
]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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