Closed Bug 784046 Opened 10 years ago Closed 10 years ago

Fix non-ES tests from mobile-ui merge

Categories

(Marketplace Graveyard :: Code Quality, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2012-08-23

People

(Reporter: cvan, Unassigned)

References

Details

From the mobile-ui/Gaia merge, we have 7 broken tests on master (not including elasticsearch tests).

======================================================================
ERROR: test_access (workspace.mkt.lookup.tests.test_views.TestPurchases)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/marketplace/workspace/../workspace/mkt/lookup/tests/test_views.py", line 644, in test_access
    res = self.client.get(self.url)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 445, in get
    response = super(Client, self).get(path, data=data, **extra)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 229, in get
    return self.request(**r)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 387, in request
    response = self.handler(environ)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 84, in __call__
    response = self.get_response(request)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/core/handlers/base.py", line 169, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/var/lib/jenkins/jobs/marketplace/workspace/apps/amo/decorators.py", line 29, in wrapper
    return func(request, *args, **kw)
  File "/var/lib/jenkins/jobs/marketplace/workspace/apps/amo/decorators.py", line 29, in wrapper
    return func(request, *args, **kw)
  File "/var/lib/jenkins/jobs/marketplace/workspace/apps/amo/decorators.py", line 61, in wrapper
    return f(request, *args, **kw)
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/views.py", line 105, in user_purchases
    'show_link': False})
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/jingo/jingo/__init__.py", line 80, in render
    rendered = render_to_string(request, template, context)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/jingo/jingo/__init__.py", line 98, in render_to_string
    return template.render(**get_context())
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/test-utils/test_utils/__init__.py", line 44, in instrumented_render
    return old_render(self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/templates/lookup/user_purchases.html", line 1, in top-level template code
    {% extends 'lookup/base.html' %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/templates/lookup/base.html", line 1, in top-level template code
    {% extends 'developers/skeleton_impala.html' %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/developers/templates/developers/skeleton_impala.html", line 96, in top-level template code
    {% block main_content %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/developers/templates/developers/skeleton_impala.html", line 99, in block "main_content"
    {% block content %}{% endblock %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/templates/lookup/user_purchases.html", line 12, in block "content"
    {% include 'account/includes/purchases.html' %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/jingo/jingo/__init__.py", line 29, in get_template
    return super(Environment, self).get_template(name, parent, globals)
  File "/usr/lib64/python2.6/site-packages/jinja2/loaders.py", line 378, in get_source
    raise TemplateNotFound(template)
TemplateNotFound: account/includes/purchases.html
-------------------- >> begin captured logging << --------------------
sentry.errors: ERROR: No servers configured, and sentry not installed. Cannot send message
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_no_support_link (workspace.mkt.lookup.tests.test_views.TestPurchases)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/marketplace/workspace/../workspace/mkt/lookup/tests/test_views.py", line 662, in test_no_support_link
    res = self.client.get(self.url)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 445, in get
    response = super(Client, self).get(path, data=data, **extra)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 229, in get
    return self.request(**r)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 387, in request
    response = self.handler(environ)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 84, in __call__
    response = self.get_response(request)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/core/handlers/base.py", line 169, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/var/lib/jenkins/jobs/marketplace/workspace/apps/amo/decorators.py", line 29, in wrapper
    return func(request, *args, **kw)
  File "/var/lib/jenkins/jobs/marketplace/workspace/apps/amo/decorators.py", line 29, in wrapper
    return func(request, *args, **kw)
  File "/var/lib/jenkins/jobs/marketplace/workspace/apps/amo/decorators.py", line 61, in wrapper
    return f(request, *args, **kw)
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/views.py", line 105, in user_purchases
    'show_link': False})
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/jingo/jingo/__init__.py", line 80, in render
    rendered = render_to_string(request, template, context)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/jingo/jingo/__init__.py", line 98, in render_to_string
    return template.render(**get_context())
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/test-utils/test_utils/__init__.py", line 44, in instrumented_render
    return old_render(self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/templates/lookup/user_purchases.html", line 1, in top-level template code
    {% extends 'lookup/base.html' %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/templates/lookup/base.html", line 1, in top-level template code
    {% extends 'developers/skeleton_impala.html' %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/developers/templates/developers/skeleton_impala.html", line 96, in top-level template code
    {% block main_content %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/developers/templates/developers/skeleton_impala.html", line 99, in block "main_content"
    {% block content %}{% endblock %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/templates/lookup/user_purchases.html", line 12, in block "content"
    {% include 'account/includes/purchases.html' %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/jingo/jingo/__init__.py", line 29, in get_template
    return super(Environment, self).get_template(name, parent, globals)
  File "/usr/lib64/python2.6/site-packages/jinja2/loaders.py", line 378, in get_source
    raise TemplateNotFound(template)
TemplateNotFound: account/includes/purchases.html
-------------------- >> begin captured logging << --------------------
sentry.errors: ERROR: No servers configured, and sentry not installed. Cannot send message
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_purchase_shows_up (workspace.mkt.lookup.tests.test_views.TestPurchases)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/marketplace/workspace/../workspace/mkt/lookup/tests/test_views.py", line 652, in test_purchase_shows_up
    res = self.client.get(self.url)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 445, in get
    response = super(Client, self).get(path, data=data, **extra)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 229, in get
    return self.request(**r)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 387, in request
    response = self.handler(environ)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 84, in __call__
    response = self.get_response(request)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/core/handlers/base.py", line 169, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/var/lib/jenkins/jobs/marketplace/workspace/apps/amo/decorators.py", line 29, in wrapper
    return func(request, *args, **kw)
  File "/var/lib/jenkins/jobs/marketplace/workspace/apps/amo/decorators.py", line 29, in wrapper
    return func(request, *args, **kw)
  File "/var/lib/jenkins/jobs/marketplace/workspace/apps/amo/decorators.py", line 61, in wrapper
    return f(request, *args, **kw)
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/views.py", line 105, in user_purchases
    'show_link': False})
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/jingo/jingo/__init__.py", line 80, in render
    rendered = render_to_string(request, template, context)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/jingo/jingo/__init__.py", line 98, in render_to_string
    return template.render(**get_context())
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/test-utils/test_utils/__init__.py", line 44, in instrumented_render
    return old_render(self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/templates/lookup/user_purchases.html", line 1, in top-level template code
    {% extends 'lookup/base.html' %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/templates/lookup/base.html", line 1, in top-level template code
    {% extends 'developers/skeleton_impala.html' %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/developers/templates/developers/skeleton_impala.html", line 96, in top-level template code
    {% block main_content %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/developers/templates/developers/skeleton_impala.html", line 99, in block "main_content"
    {% block content %}{% endblock %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/lookup/templates/lookup/user_purchases.html", line 12, in block "content"
    {% include 'account/includes/purchases.html' %}
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/jingo/jingo/__init__.py", line 29, in get_template
    return super(Environment, self).get_template(name, parent, globals)
  File "/usr/lib64/python2.6/site-packages/jinja2/loaders.py", line 378, in get_source
    raise TemplateNotFound(template)
TemplateNotFound: account/includes/purchases.html
-------------------- >> begin captured logging << --------------------
sentry.errors: ERROR: No servers configured, and sentry not installed. Cannot send message
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_no_user_agent (workspace.mkt.site.tests.test_middleware.TestVaryMiddleware)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/lib/python/mock.py", line 1224, in patched
    return func(*args, **keywargs)
  File "/var/lib/jenkins/jobs/marketplace/workspace/../workspace/mkt/site/tests/test_middleware.py", line 359, in test_no_user_agent
    r = self.client.get('/apps/', follow=True)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 445, in get
    response = super(Client, self).get(path, data=data, **extra)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 229, in get
    return self.request(**r)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 387, in request
    response = self.handler(environ)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/test/client.py", line 84, in __call__
    response = self.get_response(request)
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/core/handlers/base.py", line 169, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/var/lib/jenkins/jobs/marketplace/workspace/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/browse/views.py", line 63, in browse_apps
    return _search(request, category)
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/browse/views.py", line 51, in _search
    ctx.update(_app_search(request, category=ctx.get('category'), browse=True))
  File "/var/lib/jenkins/jobs/marketplace/workspace/mkt/search/views.py", line 169, in _app_search
    cats = [f['term'] for f in facets['category']]
KeyError: "'category'\n-------------------- >> begin captured logging << --------------------\nelasticutils: DEBUG: [<MagicMock name='get_es().search().__getitem__()' id='272463696'>] {'sort': [{'popularity': 'desc'}], 'query': {'bool': {'must': [{'term': {'status': 4}}, {'term': {'is_disabled': False}}, {'term': {'type': 11}}]}}, 'facets': {'category': {'terms': {'field': 'category'}}}, 'size': 0, 'fields': ['id']}\nelasticutils: DEBUG: [<MagicMock name='get_es().search().__getitem__()' id='272463696'>] {'sort': [{'popularity': 'desc'}], 'query': {'bool': {'must': [{'term': {'status': 4}}, {'term': {'is_disabled': False}}, {'term': {'type': 11}}]}}, 'facets': {'category': {'terms': {'field': 'category'}}}, 'size': <MagicMock name='get_es().search().__getitem__().__getitem__().__sub__()' id='272505424'>, 'fields': ['id']}\nelasticutils: DEBUG: [<MagicMock name='get_es().search().__getitem__()' id='272463696'>] {'sort': [{'popularity': 'desc'}], 'query': {'bool': {'must': [{'term': {'status': 4}}, {'term': {'is_disabled': False}}, {'term': {'type': 11}}]}}, 'facets': {'category': {'terms': {'field': 'category'}}}, 'fields': ['id']}\nelasticutils: DEBUG: [<MagicMock name='get_es().search().__getitem__()' id='272463696'>] {'sort': [{'popularity': 'desc'}], 'query': {'bool': {'must': [{'term': {'status': 4}}, {'term': {'is_disabled': False}}, {'term': {'type': 11}}]}}, 'facets': {'category': {'terms': {'field': 'category'}}}, 'fields': ['id']}\nsentry.errors: ERROR: No servers configured, and sentry not installed. Cannot send message\n--------------------- >> end captured logging << ---------------------"

======================================================================
FAIL: test_edit_all_notifications (workspace.mkt.account.tests.test_views.TestAccountSettings)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/marketplace/workspace/../workspace/mkt/account/tests/test_views.py", line 183, in test_edit_all_notifications
    self.post_notifications(email.APP_NOTIFICATIONS_CHOICES)
  File "/var/lib/jenkins/jobs/marketplace/workspace/../workspace/mkt/account/tests/test_views.py", line 148, in post_notifications
    self.check_default_choices(choices=choices, checked=choices)
  File "/var/lib/jenkins/jobs/marketplace/workspace/../workspace/mkt/account/tests/test_views.py", line 137, in check_default_choices
    eq_(doc('input[name=notifications]:checkbox').length, len(choices))
AssertionError: 0 != 6

======================================================================
FAIL: test_edit_non_dev_notifications (workspace.mkt.account.tests.test_views.TestAccountSettings)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/marketplace/workspace/../workspace/mkt/account/tests/test_views.py", line 186, in test_edit_non_dev_notifications
    self.post_notifications(email.APP_NOTIFICATIONS_CHOICES_NOT_DEV)
  File "/var/lib/jenkins/jobs/marketplace/workspace/../workspace/mkt/account/tests/test_views.py", line 148, in post_notifications
    self.check_default_choices(choices=choices, checked=choices)
  File "/var/lib/jenkins/jobs/marketplace/workspace/../workspace/mkt/account/tests/test_views.py", line 137, in check_default_choices
    eq_(doc('input[name=notifications]:checkbox').length, len(choices))
AssertionError: 0 != 1

======================================================================
FAIL: test_success (workspace.mkt.account.tests.test_views.TestAccountSettings)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/marketplace/workspace/../workspace/mkt/account/tests/test_views.py", line 96, in test_success
    eq_(doc('#id_' + field).val(), expected)
AssertionError: None != 'http://omg.org/'

----------------------------------------------------------------------
XML: nosetests.xml
----------------------------------------------------------------------
Ran 1412 tests in 448.714s

FAILED (SKIP=66, errors=4, failures=3)
Summary: Fix non-ES tests from mobile-UI merge → Fix non-ES tests from mobile-ui merge
https://ci.mozilla.org/job/marketplace/

Jenkins is green! Thanks, everyone!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.