Commit 8abb34f8 authored by cj0125's avatar cj0125

Added functional test to orders_create_form. Also added its corresponding...

Added functional test to orders_create_form. Also added its corresponding html, url, and view to test it.
parent f5f65351
<html>
<head>
<title>Orders - Create Form</title>
</head>
</html>
\ No newline at end of file
......@@ -15,12 +15,13 @@ Including another URLconf
"""
from django.conf.urls import url
from .views import IngredientsCreateFormView, IngredientsDetailView, IngredientsListView, IngredientsUpdateFormView
from .views import IngredientsCreateFormView, IngredientsDetailView, IngredientsListView, IngredientsUpdateFormView, OrdersCreateFormView
urlpatterns = [
url(r'^ingredients_create_form$',IngredientsCreateFormView.as_view(),name='ICF'),
url(r'^ingredients_detail$',IngredientsDetailView.as_view(),name='ID'),
url(r'^ingredients_list$', IngredientsListView.as_view(), name='IL'),
url(r'^ingredients_update_form$',IngredientsUpdateFormView.as_view(),name='IUF'),
url(r'^orders_create_form$',OrdersCreateFormView.as_view(),name='OCF'),
]
......@@ -18,3 +18,8 @@ class IngredientsUpdateFormView(UpdateView):
model = None
template_name = 'ingredients_update_form.html'
class OrdersCreateFormView(CreateView):
model = None
template_name = 'orders_create_form.html'
......@@ -28,13 +28,18 @@ class NewVisitorTest(unittest.TestCase):
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!')
def test_display_IUF(self):
self.browser.get('http://localhost:8000/ingredients_update_form')
self.assertIn('Ingredients - Update Form', self.browser.title)
self.assertIn('http://localhost:8000/ingredients_update_form', self.browser.current_url)
def test_display_OCF(self):
self.browser.get('http://localhost:8000/orders_create_form')
self.assertIn('Orders - Create Form', self.browser.title)
self.assertIn('http://localhost:8000/orders_create_form', self.browser.current_url)
self.fail('Finish the test!')
if __name__ == '__main__':
unittest.main(warnings = 'ignore')
......@@ -473,3 +473,107 @@ JavaScript error: resource://gre/modules/Sqlite.jsm, line 912: Error: Connection
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
1584703756813 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_mozprofileDlraP1"
1584703759218 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1584703761523 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1584703761523 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1584703761524 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1584703761524 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.
1584703769272 Marionette INFO Listening on port 59195
1584703769373 Marionette WARN TLS certificate errors will be ignored for this session
1584703777815 Marionette INFO Stopped listening on port 59195
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.
JavaScript error: resource://gre/modules/NewTabUtils.jsm, line 669: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavHistoryService.asyncExecuteLegacyQuery]
###!!! [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
1584703788806 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_mozprofileChjAEv"
1584703791464 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1584703793514 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1584703793515 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1584703793515 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1584703793516 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.
1584703799505 Marionette INFO Listening on port 59244
1584703799850 Marionette WARN TLS certificate errors will be ignored for this session
1584703803247 Marionette INFO Stopped listening on port 59244
JavaScript error: resource://gre/modules/NewTabUtils.jsm, line 669: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavHistoryService.asyncExecuteLegacyQuery]
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
1584703812077 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_mozprofilemcqZ2L"
1584703813441 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1584703815423 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1584703815423 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1584703815424 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1584703815424 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.
1584703820674 Marionette INFO Listening on port 59291
1584703821036 Marionette WARN TLS certificate errors will be ignored for this session
1584703825661 Marionette INFO Stopped listening on port 59291
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
1584703834315 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_mozprofileY2c0zv"
1584703835547 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1584703837538 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1584703837538 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1584703837538 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1584703837539 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.
1584703844222 Marionette INFO Listening on port 59344
1584703844295 Marionette WARN TLS certificate errors will be ignored for this session
1584703851329 Marionette INFO Stopped listening on port 59344
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
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
1584703862695 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_mozprofileSJJCmN"
1584703864340 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1584703866492 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1584703866492 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1584703866492 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1584703866493 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.
1584703871247 Marionette INFO Listening on port 59383
1584703871701 Marionette WARN TLS certificate errors will be ignored for this session
1584703874563 Marionette INFO Stopped listening on port 59383
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
1584703882833 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_mozprofileVULqju"
1584703884087 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1584703886021 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1584703886021 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1584703886022 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1584703886022 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.
1584703890724 Marionette INFO Listening on port 59428
1584703891177 Marionette WARN TLS certificate errors will be ignored for this session
1584703893542 Marionette INFO Stopped listening on port 59428
JavaScript error: resource://services-settings/RemoteSettingsClient.jsm, line 144: Error: Unknown callback
###!!! [Child][RunMessage] Error: 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