def test_form_valid(self): view = RequestCourseView() form = RequestCourseForm() form.cleaned_data = { 'name': 'Test Instructor', 'email': '*****@*****.**', 'uni': 'ttt123', 'course': 'Test Course', 'course_id': 'Test Course Id', 'term': 'Fall', 'year': '2014', 'instructor': 'Test Instructor', 'section_leader': 'Test Teachers Assistant', 'start': datetime.now(), 'end': datetime.now(), 'students': 24, 'assignments_required': True, 'description': 'Description', 'title': 'The Course', 'pid': '123', 'mid': '456', 'type': 'action item', 'owner': 'sdreher', 'assigned_to': 'sdreher' } with self.settings(TASK_ASSIGNMENT_DESTINATION=None): view.form_valid(form)
auth_urls, # see above # Bookmarklet + cache defeating url(r'^bookmarklets/(?P<path>analyze.js)$', 'django.views.static.serve', {'document_root': bookmarklet_root}, name='analyze-bookmarklet'), url(r'^nocache/\w+/bookmarklets/(?P<path>analyze.js)$', 'django.views.static.serve', {'document_root': bookmarklet_root}, name='nocache-analyze-bookmarklet'), url(r'^captcha/', include('captcha.urls')), (r'^comments/', include('django.contrib.comments.urls')), (r'^contact/', login_required(TemplateView.as_view(template_name="main/contact.html"))), (r'^course/request/success/$', TemplateView.as_view(template_name="main/course_request_success.html")), (r'^course/request/', RequestCourseView.as_view()), # Courseaffils url(r'^accounts/logged_in.js$', 'courseaffils.views.is_logged_in', name='is_logged_in.js'), url(r'^nocache/\w+/accounts/logged_in.js$', 'courseaffils.views.is_logged_in', name='nocache-is_logged_in.js'), (r'^crossdomain.xml$', 'django.views.static.serve', { 'document_root': os.path.abspath(os.path.dirname(__file__)), 'path': 'crossdomain.xml' }), url(r'^dashboard/migrate/materials/(?P<course_id>\d+)/$', MigrateMaterialsView.as_view(), {}, 'dashboard-migrate-materials'), url(r'^dashboard/migrate/$', MigrateCourseView.as_view(), {},
# Bookmarklet + cache defeating url(r'^bookmarklets/(?P<path>analyze.js)$', 'django.views.static.serve', {'document_root': bookmarklet_root}, name='analyze-bookmarklet'), url(r'^nocache/\w+/bookmarklets/(?P<path>analyze.js)$', 'django.views.static.serve', {'document_root': bookmarklet_root}, name='nocache-analyze-bookmarklet'), url(r'^captcha/', include('captcha.urls')), (r'^comments/', include('django.contrib.comments.urls')), (r'^contact/', login_required( TemplateView.as_view(template_name="main/contact.html"))), (r'^course/request/success/$', TemplateView.as_view(template_name="main/course_request_success.html")), (r'^course/request/', RequestCourseView.as_view()), # Courseaffils url(r'^accounts/logged_in.js$', 'courseaffils.views.is_logged_in', name='is_logged_in.js'), url(r'^nocache/\w+/accounts/logged_in.js$', 'courseaffils.views.is_logged_in', name='nocache-is_logged_in.js'), (r'^crossdomain.xml$', 'django.views.static.serve', {'document_root': os.path.abspath(os.path.dirname(__file__)), 'path': 'crossdomain.xml'}), url(r'^dashboard/migrate/materials/(?P<course_id>\d+)/$', MigrateMaterialsView.as_view(), {}, 'dashboard-migrate-materials'), url(r'^dashboard/migrate/$', MigrateCourseView.as_view(), {}, "dashboard-migrate"),