Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit 464c7c6e authored by Rahmania Astrid Mochtar's avatar Rahmania Astrid Mochtar
Browse files

added django_mutpy to requirements

parent bc4306a0
No related branches found
No related tags found
1 merge request!10completed 18.1-18.3
Pipeline #24879 passed
# from django.core import mail
# from selenium.webdriver.common.keys import Keys
# import re
# from .base import FunctionalTest
# TEST_EMAIL = 'edith@example.com'
# SUBJECT = 'Your login link for Superlists'
# class LoginTest(FunctionalTest):
# def test_can_get_email_link_to_log_in(self):
# # Edith goes to the awesome superlists site
# # and notices a "Log in" section in the navbar for the first time
# # It's telling her to enter her email address, so she does
# self.browser.get(self.live_server_url)
# self.browser.find_element_by_name('email').send_keys(TEST_EMAIL)
# self.browser.find_element_by_name('email').send_keys(Keys.ENTER)
# # A message appears telling her an email has been sent
# self.wait_for(lambda: self.assertIn(
# 'Check your email',
# self.browser.find_element_by_tag_name('body').text
# ))
# # She checks her email and finds a message
# email = mail.outbox[0]
# self.assertIn(TEST_EMAIL, email.to)
# self.assertEqual(email.subject, SUBJECT)
# # It has a url link in it
# self.assertIn('Use this link to log in', email.body)
# url_search = re.search(r'http://.+/.+$', email.body)
# if not url_search:
# self.fail(f'Could not find url in email body:\n{email.body}')
# url = url_search.group(0)
# self.assertIn(self.live_server_url, url)
# # she clicks it
# self.browser.get(url)
# # she is logged in!
# self.wait_for(
# lambda: self.browser.find_element_by_link_text('Log out')
# )
# navbar = self.browser.find_element_by_css_selector('.navbar')
# self.assertIn(TEST_EMAIL, navbar.text)
......@@ -3,4 +3,5 @@ Django==2.1.7
selenium==3.141.0
gunicorn==19.9.0
psycopg2
dj_database_url
\ No newline at end of file
dj_database_url
django_mutpy
\ No newline at end of file
......@@ -150,4 +150,21 @@ EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'empecempc@gmail.com'
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_PASSWORD')
EMAIL_PORT = 587
EMAIL_USE_TLS = True
\ No newline at end of file
EMAIL_USE_TLS = True
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django': {
'handlers': ['console'],
},
},
'root': {'level': 'INFO'},
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment