This site is an archive; learn more about 8 years of OpenHatch.

[OH-Dev] [issue1010] base test error in profile/views.py

Susan Tan bugs at openhatch.org
Fri Jul 4 04:00:10 UTC 2014


New submission from Susan Tan <onceuponatimeforever at gmail.com>:

Steps to Repro: 

1. Start the mysql server 
2. export USE_MYSQL=1
3. python manage.py test base 
4. See the following error:

==============================================================
========
ERROR: test_submit_form (mysite.base.tests.Unsubscribe)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/susantan/Projects/oh-mainline/mysite/base/tests.py", line 410, in test_submit_form
    tc.submit()
  File "/Users/susantan/Projects/oh-mainline/vendor/packages/twill/twill/commands.py", line 363, in 
submit
    browser.submit(submit_button)
  File "/Users/susantan/Projects/oh-mainline/vendor/packages/twill/twill/browser.py", line 467, in 
submit
    self._journey('open', request)
  File "/Users/susantan/Projects/oh-mainline/vendor/packages/twill/twill/browser.py", line 523, in 
_journey
    r = func(*args, **kwargs)
  File "/Users/susantan/Projects/oh-
mainline/vendor/packages/twill/twill/other_packages/_mechanize_dist/_mechanize.py", line 212, in 
open
    return self._mech_open(url, data)
  File "/Users/susantan/Projects/oh-
mainline/vendor/packages/twill/twill/other_packages/_mechanize_dist/_mechanize.py", line 238, in 
_mech_open
    response = UserAgentBase.open(self, request, data)
  File "/Users/susantan/Projects/oh-
mainline/vendor/packages/twill/twill/other_packages/_mechanize_dist/_opener.py", line 181, in open
    response = urlopen(self, req, data)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 
422, in _open
    meth_name = 'http_error_%s' % proto
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 
382, in _call_chain
  File "/Users/susantan/Projects/oh-mainline/vendor/packages/twill/twill/_browser.py", line 16, in 
http_open
    return self.do_open(wsgi_intercept.WSGI_HTTPConnection, req)
  File "/Users/susantan/Projects/oh-
mainline/vendor/packages/twill/twill/other_packages/_mechanize_dist/_http.py", line 675, in 
do_open
    r = h.getresponse()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 
1043, in getresponse
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 
346, in __init__
    self.msg = None
  File "/Users/susantan/Projects/oh-mainline/vendor/packages/twill/twill/wsgi_intercept.py", line 
245, in makefile
    app_result = self.app(environ, start_response)
  File "/Users/susantan/Projects/oh-
mainline/vendor/packages/Django/django/contrib/staticfiles/handlers.py", line 72, in __call__
    return self.application(environ, start_response)
  File "/Users/susantan/Projects/oh-
mainline/vendor/packages/Django/django/core/handlers/wsgi.py", line 255, in __call__
    response = self.get_response(request)
  File "/Users/susantan/Projects/oh-
mainline/vendor/packages/Django/django/core/handlers/base.py", line 176, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/Users/susantan/Projects/oh-
mainline/vendor/packages/Django/django/core/handlers/base.py", line 113, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/Users/susantan/Projects/oh-mainline/mysite/profile/views.py", line 906, in unsubscribe_do
    person.email_me_re_projects = False
AttributeError: 'NoneType' object has no attribute 'email_me_re_projects'

----------------------------------------------------------------------
Ran 27 tests in 5.781s

----------
messages: 4430
nosy: onceuponatimeforever, paulproteus
priority: bug
status: chatting
title: base test error in profile/views.py

__________________________________________
Roundup issue tracker <bugs at openhatch.org>
<https://openhatch.org/bugs/issue1010>
__________________________________________


More information about the Devel mailing list