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
de07acef
Commit
de07acef
authored
Sep 27, 2019
by
Syahrul Findi
Browse files
Merge branch 'latihan2' into 'master'
Latihan2 See merge request
!4
parents
5825e70c
54b07e65
Pipeline
#21195
passed with stage
in 1 minute and 41 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
de07acef
image
:
django:latest
before_script
:
-
apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev
-
python manage.py migrate
test
:
script
:
-
python manage.py test
functional_test.py
View file @
de07acef
...
...
@@ -2,6 +2,7 @@ from selenium import webdriver
from
selenium.webdriver.common.keys
import
Keys
import
unittest
import
time
import
os
class
NewVisitorTest
(
unittest
.
TestCase
):
...
...
@@ -19,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
(
'http://localhost:8000'
)
self
.
browser
.
get
(
os
.
environ
[
'APP_URL'
]
)
# She notices the page title and header mention to-do lists
self
.
assertIn
(
'To-Do'
,
self
.
browser
.
title
)
...
...
latihan1/settings.py
View file @
de07acef
...
...
@@ -11,7 +11,11 @@ https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import
os
import
django_heroku
if
'I_AM_HEROKU'
in
os
.
environ
:
# Configure Django App for Heroku.
import
django_heroku
django_heroku
.
settings
(
locals
())
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
...
...
@@ -122,6 +126,3 @@ PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT
=
os
.
path
.
join
(
PROJECT_DIR
,
'static'
)
STATIC_URL
=
'/static/'
# Activate Django-Heroku.
django_heroku
.
settings
(
locals
())
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