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
1406568923-practice
Commits
82deca8f
Commit
82deca8f
authored
Sep 19, 2019
by
emil farisan
Browse files
first unit test and url mapping, dummy view
parent
2e82ba8a
Changes
4
Hide whitespace changes
Inline
Side-by-side
geckodriver.log
View file @
82deca8f
...
...
@@ -21,3 +21,4 @@
1568819179407 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
1568819187392 Marionette INFO Listening on port 45121
1568819187515 Marionette WARN TLS certificate errors will be ignored for this session
1568882716569 Marionette INFO Stopped listening on port 45121
lists/tests.py
View file @
82deca8f
from
django.urls
import
resolve
from
django.test
import
TestCase
from
lists.views
import
home_page
class
Smok
eTest
(
TestCase
):
def
test_bad_maths
(
self
):
self
.
assertEqual
(
1
+
1
,
3
)
class
HomePag
eTest
(
TestCase
):
def
test_root_url_resolves_to_home_page_view
(
self
):
found
=
resolve
(
'/'
)
self
.
assertEqual
(
found
.
func
,
home_page
)
lists/views.py
View file @
82deca8f
from
django.shortcuts
import
render
# Create your views here.
def
home_page
():
pass
superlists/urls.py
View file @
82deca8f
...
...
@@ -17,5 +17,6 @@ from django.contrib import admin
from
django.urls
import
path
urlpatterns
=
[
path
(
'admin/'
,
admin
.
site
.
urls
),
path
(
'$'
,
'lists.views.home'
)
# path('admin/', admin.site.urls),
]
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