贡献给mozilla codebas

2024-09-28 01:28:28 发布

您现在位置:Python中文网/ 问答频道 /正文

在练习了很久的django之后,我决定为mozilla做贡献。你知道吗

正如许多人所建议的,初学者总是从修复bug开始。你知道吗

我正在关注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)

Tags: inpytestmozillahomeliblinetests

热门问题