Fakultas Ilmu Komputer UI

Commit 54b07e65 authored by Syahrul Findi's avatar Syahrul Findi
Browse files

Merge branch 'latihan2' of...

Merge branch 'latihan2' of gitlab.cs.ui.ac.id:pmpl/practice-collection/2019/1506757352-practice into latihan2
parent 5825e70c
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
......@@ -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)
......
......@@ -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())
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