长期练习django后,我决定为mozilla做贡献。
根据许多人的建议,初学者总是从错误修复开始。
我正在关注mozilla的this document。
我已经成功设置了virtualenv,克隆了代码库。
但是当我运行./manage.py tests
时,测试失败并出现3个错误。
这是什么意思?这些错误本身是否需要修复?
克隆后我发现了这些错误,但我没有做任何改动。
对此有何见解?
测试失败......
(venv)abhishek@abhishek-X200CAP:~/bedrock$ ./manage.py test
nosetests --verbosity=1
Creating test database for alias 'default'...
/home/abhishek/bedrock/bedrock/mozorg/tests/test_views.py:15: DeprecationWarning: django.utils.simplejson is deprecated; use json instead.
from django.utils import simplejson
........................................................................................................................................................................................................................................................................................................F.....F.F.....F.........................FF................................................................................................................................................................................................................S..................
======================================================================
FAIL: test_no_autoresponse_locale (bedrock.mozorg.tests.test_views.TestContribute)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/abhishek/.virtualenvs/venv/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/abhishek/bedrock/bedrock/mozorg/tests/test_views.py", line 546, in test_no_autoresponse_locale
eq_(m.cc, ['envolva-se-mozilla-brasil@googlegroups.com'])
File "/home/abhishek/bedrock/vendor/lib/python/nose/tools.py", line 31, in eq_
assert a == b, msg or "%r != %r" % (a, b)
AssertionError: ['josh@joshmatthews.net'] != ['envolva-se-mozilla-brasil@googlegroups.com']
======================================================================
FAIL: test_with_autoresponse_locale (bedrock.mozorg.tests.test_views.TestContribute)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/abhishek/.virtualenvs/venv/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/abhishek/bedrock/bedrock/mozorg/tests/test_views.py", line 564, in test_with_autoresponse_locale
eq_(m.cc, cc)
File "/home/abhishek/bedrock/vendor/lib/python/nose/tools.py", line 31, in eq_
assert a == b, msg or "%r != %r" % (a, b)
AssertionError: ['mana@mozilla.com'] != ['envolva-se-mozilla-brasil@googlegroups.com']
======================================================================
FAIL: test_no_autoresponse_locale (bedrock.mozorg.tests.test_views.TestContributeOldPage)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/abhishek/.virtualenvs/venv/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/abhishek/bedrock/bedrock/mozorg/tests/test_views.py", line 389, in test_no_autoresponse_locale
eq_(m.cc, ['envolva-se-mozilla-brasil@googlegroups.com'])
File "/home/abhishek/bedrock/vendor/lib/python/nose/tools.py", line 31, in eq_
assert a == b, msg or "%r != %r" % (a, b)
AssertionError: ['josh@joshmatthews.net'] != ['envolva-se-mozilla-brasil@googlegroups.com']
======================================================================
FAIL: test_with_autoresponse_locale (bedrock.mozorg.tests.test_views.TestContributeOldPage)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/abhishek/.virtualenvs/venv/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/abhishek/bedrock/bedrock/mozorg/tests/test_views.py", line 407, in test_with_autoresponse_locale
eq_(m.cc, cc)
File "/home/abhishek/bedrock/vendor/lib/python/nose/tools.py", line 31, in eq_
assert a == b, msg or "%r != %r" % (a, b)
AssertionError: ['mana@mozilla.com'] != ['envolva-se-mozilla-brasil@googlegroups.com']
======================================================================
FAIL: test_country_selected (bedrock.newsletter.tests.test_footer_form.TestNewsletterFooter)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/abhishek/.virtualenvs/venv/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/abhishek/bedrock/bedrock/newsletter/tests/test_footer_form.py", line 29, in test_country_selected
eq_(doc('#id_country option[selected="selected"]').val(), '')
File "/home/abhishek/bedrock/vendor/lib/python/nose/tools.py", line 31, in eq_
assert a == b, msg or "%r != %r" % (a, b)
AssertionError: 'us' != ''
======================================================================
FAIL: test_language_selected (bedrock.newsletter.tests.test_footer_form.TestNewsletterFooter)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/abhishek/.virtualenvs/venv/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/abhishek/bedrock/bedrock/newsletter/tests/test_footer_form.py", line 44, in test_language_selected
eq_(doc('#id_lang option[selected="selected"]').val(), 'fr')
File "/home/abhishek/bedrock/vendor/lib/python/nose/tools.py", line 31, in eq_
assert a == b, msg or "%r != %r" % (a, b)
AssertionError: 'en' != 'fr'
----------------------------------------------------------------------
Ran 565 tests in 10.621s
FAILED (SKIP=1, failures=6)