diff --git a/geckodriver.log b/geckodriver.log index 96212f4578b43a533d29089d644cb325051d0db7..3a4c6bf14491b1497e81e66623526982617afb41 100644 --- a/geckodriver.log +++ b/geckodriver.log @@ -81,3 +81,20 @@ JavaScript error: resource://activity-stream/lib/ActivityStreamPrefs.jsm, line 2 [GPU 10028, C ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv +1568779358781 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\KEVINS~1\\AppData\\Local\\Temp\\rust_mozprofileN4M45V" +1568779363445 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons +1568779363446 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry +1568779363446 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/ +1568779363446 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader* +JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +[Parent 9752, Gecko_IOThread] WARNING: pipe error: 109: file z:/task_1566864336/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341 +[Child 7312, Chrome_ChildThread] WARNING: pipe error: 109: file z:/task_1566864336/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341 +[Parent 9752, Gecko_IOThread] WARNING: file z:/task_1566864336/build/src/ipc/chromium/src/base/process_util_win.cc, line 160 +1568779409922 Marionette INFO Listening on port 61191 +1568779410281 Marionette WARN TLS certificate errors will be ignored for this session +1568779417972 Marionette INFO Stopped listening on port 61191 +JavaScript error: resource://gre/modules/UrlClassifierListManager.jsm, line 680: TypeError: this.tablesData[table] is undefined +[Parent 9752, Gecko_IOThread] WARNING: pipe error: 109: file z:/task_1566864336/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341 +[Parent 9752, Gecko_IOThread] WARNING: pipe error: 109: file z:/task_1566864336/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341 +[Child 13088, Chrome_ChildThread] WARNING: pipe error: 109: file z:/task_1566864336/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341 +[Child 13088, [GPU 9784, Chro \ No newline at end of file diff --git a/lists/__pycache__/tests.cpython-37.pyc b/lists/__pycache__/tests.cpython-37.pyc index 4d4c5d55294b0df65b54c57dbb2c5c1c4aa75985..478100ef9fb6b56282f3d0fc960adca028173bd6 100644 Binary files a/lists/__pycache__/tests.cpython-37.pyc and b/lists/__pycache__/tests.cpython-37.pyc differ diff --git a/lists/__pycache__/views.cpython-37.pyc b/lists/__pycache__/views.cpython-37.pyc index 59f95e25e9482a44992a3d54e112c9b96d348e09..874c8429d92a32670bfb439bed3876ad0292d1df 100644 Binary files a/lists/__pycache__/views.cpython-37.pyc and b/lists/__pycache__/views.cpython-37.pyc differ diff --git a/lists/tests.py b/lists/tests.py index f918990fc5554ed79e7ea2c8eb6f6fbc999a1b6e..75346f61505161733e3778a0269702cef84f8f0e 100644 --- a/lists/tests.py +++ b/lists/tests.py @@ -1,9 +1,21 @@ from django.urls import resolve from django.test import TestCase -from lists.views import home_page +from django.http import HttpRequest + +from lists.views import home_page + class HomePageTest(TestCase): def test_root_url_resolves_to_home_page_view(self): - found = resolve('/') - self.assertEqual(found.func, home_page) \ No newline at end of file + found = resolve('/') + self.assertEqual(found.func, home_page) + + + def test_home_page_returns_correct_html(self): + request = HttpRequest() + response = home_page(request) + html = response.content.decode('utf8') + self.assertTrue(html.startswith('<html>')) + self.assertIn('<title>To-Do lists</title>', html) + self.assertTrue(html.endswith('</html>')) \ No newline at end of file diff --git a/lists/views.py b/lists/views.py index 444abe40e5262a8f76393398d1a6a3287c31a17f..ec6a9bc35fd1974326e6e59363c99d430c696bd7 100644 --- a/lists/views.py +++ b/lists/views.py @@ -1,5 +1,5 @@ -from django.shortcuts import render +from django.http import HttpResponse # Create your views here. -def home_page(): - pass \ No newline at end of file +def home_page(request): + return HttpResponse('<html><title>To-Do lists</title></html>') \ No newline at end of file