Commit b8110b0a authored by cj0125's avatar cj0125

Added functional test to ingredients_list. Also added its corresponding html,...

Added functional test to ingredients_list. Also added its corresponding html, url, and views to test it.
parent 23cf62d9
<html>
<head>
<title>Ingredients - List</title>
</head>
</html>
\ No newline at end of file
...@@ -15,10 +15,11 @@ Including another URLconf ...@@ -15,10 +15,11 @@ Including another URLconf
""" """
from django.conf.urls import url from django.conf.urls import url
from .views import IngredientsCreateFormView, IngredientsDetailView from .views import IngredientsCreateFormView, IngredientsDetailView, IngredientsListView
urlpatterns = [ urlpatterns = [
url(r'^ingredients_create_form$',IngredientsCreateFormView.as_view(),name='ICF'), url(r'^ingredients_create_form$',IngredientsCreateFormView.as_view(),name='ICF'),
url(r'^ingredients_detail$',IngredientsDetailView.as_view(),name='ID'), url(r'^ingredients_detail$',IngredientsDetailView.as_view(),name='ID'),
url(r'^ingredients_list$', IngredientsListView.as_view(), name='IL'),
] ]
...@@ -10,3 +10,6 @@ class IngredientsCreateFormView(CreateView): ...@@ -10,3 +10,6 @@ class IngredientsCreateFormView(CreateView):
class IngredientsDetailView(DetailView): class IngredientsDetailView(DetailView):
model = None model = None
class IngredientsListView(ListView):
model = None
...@@ -22,7 +22,12 @@ class NewVisitorTest(unittest.TestCase): ...@@ -22,7 +22,12 @@ class NewVisitorTest(unittest.TestCase):
def test_display_ID(self): def test_display_ID(self):
self.browser.get('http://localhost:8000/ingredients_detail') self.browser.get('http://localhost:8000/ingredients_detail')
self.assertIn('Ingredients - Detail', self.browser.title) self.assertIn('Ingredients - Detail', self.browser.title)
self.assertIn('http://localhost:8000/ingredients_detail', self.browser.current_url) self.assertIn('http://localhost:8000/ingredients_detail', self.browser.current_url)
def test_display_IL(self):
self.browser.get('http://localhost:8000/ingredients_list')
self.assertIn('Ingredients - List', self.browser.title)
self.assertIn('http://localhost:8000/ingredients_list', self.browser.current_url)
self.fail('Finish the test!') self.fail('Finish the test!')
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -273,3 +273,85 @@ JavaScript error: resource://services-settings/RemoteSettingsClient.jsm, line 14 ...@@ -273,3 +273,85 @@ JavaScript error: resource://services-settings/RemoteSettingsClient.jsm, line 14
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
1584702912120 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\ANTHON~1\\AppData\\Local\\Temp\\rust_mozprofileI1oN5w"
1584702916539 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1584702919529 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1584702919529 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1584702919529 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1584702919530 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.
IPDL protocol error: Handler returned error code!
###!!! [Parent][DispatchAsyncMessage] Error: PLayerTransaction::Msg_ReleaseLayer Processing error: message was deserialized, but the handler returned false (indicating failure)
IPDL protocol error: Handler returned error code!
###!!! [Parent][DispatchAsyncMessage] Error: PLayerTransaction::Msg_ReleaseLayer Processing error: message was deserialized, but the handler returned false (indicating failure)
IPDL protocol error: Handler returned error code!
###!!! [Parent][DispatchAsyncMessage] Error: PLayerTransaction::Msg_ReleaseLayer Processing error: message was deserialized, but the handler returned false (indicating failure)
IPDL protocol error: Handler returned error code!
###!!! [Parent][DispatchAsyncMessage] Error: PLayerTransaction::Msg_ReleaseLayer Processing error: message was deserialized, but the handler returned false (indicating failure)
IPDL protocol error: Handler returned error code!
###!!! [Parent][DispatchAsyncMessage] Error: PLayerTransaction::Msg_ReleaseLayer Processing error: message was deserialized, but the handler returned false (indicating failure)
[Parent 11364, Gecko_IOThread] WARNING: file z:/task_1581954009/build/src/ipc/chromium/src/base/process_util_win.cc, line 160
1584702965829 Marionette INFO Listening on port 58617
1584702966796 Marionette WARN TLS certificate errors will be ignored for this session
1584702970947 Marionette INFO Stopped listening on port 58617
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
1584702982173 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\ANTHON~1\\AppData\\Local\\Temp\\rust_mozprofileXXX1Vt"
1584702984346 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1584702986834 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1584702986834 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1584702986834 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1584702986835 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.
1584702992456 Marionette INFO Listening on port 58699
1584702992647 Marionette WARN TLS certificate errors will be ignored for this session
1584702995449 Marionette INFO Stopped listening on port 58699
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
1584703004485 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\ANTHON~1\\AppData\\Local\\Temp\\rust_mozprofileqB5J2t"
1584703005706 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1584703007604 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1584703007605 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1584703007605 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1584703007605 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.
1584703012697 Marionette INFO Listening on port 58740
1584703012837 Marionette WARN TLS certificate errors will be ignored for this session
1584703018406 Marionette INFO Stopped listening on port 58740
1584703028043 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\ANTHON~1\\AppData\\Local\\Temp\\rust_mozprofileoKcBuD"
1584703029330 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1584703031468 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1584703031468 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1584703031469 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1584703031469 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.
1584703036310 Marionette INFO Listening on port 58778
1584703036382 Marionette WARN TLS certificate errors will be ignored for this session
1584703039217 Marionette INFO Stopped listening on port 58778
JavaScript error: resource://activity-stream/lib/ActivityStreamPrefs.jsm, line 27: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIPrefBranch.removeObserver]
JavaScript error: resource://services-settings/RemoteSettingsClient.jsm, line 144: Error: Unknown callback
JavaScript error: resource://gre/modules/Sqlite.jsm, line 912: Error: Connection is not open.
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel] Error: (msgtype=0xB60013,name=PWindowGlobal::Msg_Destroy) Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
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