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
1506757352-practice
Commits
9a8d9f94
Commit
9a8d9f94
authored
Oct 01, 2019
by
Syahrul Ardiansyah
Browse files
Make functional_tests an app, use LiveServerTestCase
parent
de5981c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
functional_tests/__init__.py
0 → 100644
View file @
9a8d9f94
functional_test.py
→
functional_test
s/tests
.py
View file @
9a8d9f94
from
selenium
import
webdriver
from
selenium.webdriver.common.keys
import
Keys
import
unittest
from
django.test
import
LiveServerTestCase
import
time
import
os
class
NewVisitorTest
(
unittest
.
TestCase
):
class
NewVisitorTest
(
LiveServer
TestCase
):
def
setUp
(
self
):
self
.
browser
=
webdriver
.
Chrome
()
...
...
@@ -20,7 +20,7 @@ class NewVisitorTest(unittest.TestCase):
def
test_can_start_a_list_and_retrieve_it_later
(
self
):
# Edith has heard about a cool new online to-do app. She goes
# to check out its homepage
self
.
browser
.
get
(
os
.
environ
[
'APP_URL'
]
)
self
.
browser
.
get
(
self
.
live_server_url
)
# She notices the page title and header mention to-do lists
self
.
assertIn
(
'To-Do'
,
self
.
browser
.
title
)
...
...
@@ -93,7 +93,3 @@ class NewVisitorTest(unittest.TestCase):
# that the site has generated a unique URL for her -- there is some
# explanatory text to that effect.
self
.
fail
(
'Finish the test!'
)
if
__name__
==
'__main__'
:
unittest
.
main
(
warnings
=
'ignore'
)
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