Commit 06611f9b authored by Kyla Villegas's avatar Kyla Villegas

Changes in urls.py and heroes/views.py

parent 7757d9b5
...@@ -31,3 +31,35 @@ JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't fin ...@@ -31,3 +31,35 @@ JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't fin
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
1583573040011 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\Admin\\AppData\\Local\\Temp\\rust_mozprofile7BEI4H"
1583573040619 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1583573041185 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1583573041185 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1583573041186 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1583573041186 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.
1583573043319 Marionette INFO Listening on port 58267
1583573043646 Marionette WARN TLS certificate errors will be ignored for this session
1583573044086 Marionette INFO Stopped listening on port 58267
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
1583573103983 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\Admin\\AppData\\Local\\Temp\\rust_mozprofilec8HOwQ"
1583573104588 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1583573105138 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1583573105138 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1583573105139 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1583573105139 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.
1583573107269 Marionette INFO Listening on port 58307
1583573107615 Marionette WARN TLS certificate errors will be ignored for this session
1583573108120 Marionette INFO Stopped listening on port 58307
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class HeroesConfig(AppConfig):
name = 'heroes'
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.urls import path
from .views import home_page
urlpatterns = [
path('', home_page, name='home_page'),
]
from django.shortcuts import render
# Create your views here.
def home_page():
pass
...@@ -13,7 +13,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -13,7 +13,7 @@ class NewVisitorTest(unittest.TestCase):
def test_can_display_a_heroes_list_and_more_information_per_hero(self): def test_can_display_a_heroes_list_and_more_information_per_hero(self):
# Widget has heard about a new wiki app for the game called The Will of the Wisps. # Widget has heard about a new wiki app for the game called The Will of the Wisps.
# She goes to check out its homepage # She goes to check out its homepage
self.browser.get('http://localhost:8000/heroes') self.browser.get('http://localhost:8000')
# She notices the page title and header mention # She notices the page title and header mention
# 'The Will of the Wisps Wiki' # 'The Will of the Wisps Wiki'
...@@ -72,7 +72,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -72,7 +72,7 @@ class NewVisitorTest(unittest.TestCase):
self.assertIn('Back to Heroes List', button) self.assertIn('Back to Heroes List', button)
button.click() button.click()
time.sleep(1) time.sleep(1)
self.assertIn(browser.getCurrentUrl(), 'http://localhost:8000/heroes') self.assertIn(browser.getCurrentUrl(), 'http://localhost:8000')
# input.send_keys('Back to Heroes List') # input.send_keys('Back to Heroes List')
# input.send_keys(Keys.Enter) # input.send_keys(Keys.Enter)
......
...@@ -37,6 +37,7 @@ INSTALLED_APPS = [ ...@@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'heroes'
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
...@@ -14,8 +14,9 @@ Including another URLconf ...@@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import path, include
urlpatterns = [ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('', include('heroes.urls')),
] ]
Markdown is supported
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