noirbizarre / django.js

Javascript tools for Django
http://djangojs.readthedocs.org/en/latest/
GNU Lesser General Public License v3.0
181 stars 80 forks source link

Failing unit tests #16

Closed johnwoltman closed 11 years ago

johnwoltman commented 11 years ago

When I use django's ./manage test, there are many failed unit tests coming from django.js. I'm using Django 1.4.5 with psycopg2. Here is a typical example:

Failure
Traceback (most recent call last):
File "/home/woltman/projects/ve/compass/lib/python2.7/site-packages/django      /test/utils.py", line 211, in inner
    return test_func(*args, **kwargs)
File "/home/woltman/projects/ve/compass/lib/python2.7/site-packages/djangojs/tests/test_urls.py", line 134, in test_urls_namespaces_whitelist
self.assertIn('ns1:fake', self.result)
AssertionError: 'ns1:fake' not found in {u'grp_doc_filter': u'/grappelli/grp-doc/filter/', u'grp_doc_mueller_grid_system_layouts': u'/grappelli/grp-doc/mueller-grid-system-layouts/', u'grp_doc_groups': u'/grappelli/grp-doc/groups/', u'grp_doc_basic_page_structure': u'/grappelli/grp-doc/basic-page-structure/', u'grp_doc_modules': u'/grappelli/grp-doc/modules/', u'js_catalog': u'/djangojs/translation', u'grp_m2m_lookup': u'/grappelli/lookup/m2m/', u'selectable-lookup': u'/selectable/<lookup_name>/', u'grp_doc_admin_index': u'/grappelli/grp-doc/admin-index/', u'grp_doc_submit_rows': u'/grappelli/grp-doc/submit-rows/', u'grp_related_lookup': u'/grappelli/lookup/related/', u'grp_doc_errors': u'/grappelli/grp-doc/errors/', u'grp_autocomplete_lookup': u'/grappelli/lookup/autocomplete/', u'grp_doc_change_list': u'/grappelli/grp-doc/change-list/', u'grp_doc_navigation': u'/grappelli/grp-doc/navigation/', u'grp_doc_pagination': u'/grappelli/grp-doc/pagination/', u'django_js_urls': u'/djangojs/urls', u'grp_doc_mueller_grid_system_tests': u'/grappelli/grp-doc/mueller-grid-system-tests/', u'grp_doc_change_form': u'/grappelli/grp-doc/change-form/', u'grp_doc_mueller_grid_system': u'/grappelli/grp-doc/mueller-grid-system/', u'grp_doc_context_navigation': u'/grappelli/grp-doc/context-navigation/', u'grp_doc_form_fields': u'/grappelli/grp-doc/form-fields/', u'grp_doc_object_tools': u'/grappelli/grp-doc/object-tools/', u'grp_doc_tables': u'/grappelli/grp-doc/tables/', u'django_js_context': u'/djangojs/context', u'grp_doc': u'/grappelli/grp-doc', u'grp_doc_tools': u'/grappelli/grp-doc/tools/', u'grp_doc_fieldsets': u'/grappelli/grp-doc/fieldsets/', u'grp_doc_date_hierarchy': u'/grappelli/grp-doc/date-hierarchy/', u'django_js_init': u'/djangojs/init.js', u'grp_doc_search_form': u'/grappelli/grp-doc/search-form/'}

What should I do to get these tests passing?

noirbizarre commented 11 years ago

Are you running the tests from you project or the django.js repository ?

I can see on the AssertionError line that the URLs are not the Django.js tests URLs.

johnwoltman commented 11 years ago

My project. I'm wondering what is going on in the tests that cause them to fail when the Grappelli admin app is loaded. When I update 3rd party Django apps like Grappelli I run ./manage test to make sure everything is still working. I recently added DjangoJS to my project and now the tests fail.

noirbizarre commented 11 years ago

I can reproduce it.

I will try to fix it ASAP.

noirbizarre commented 11 years ago

Fixed by b80491c9c8c8f082bb6866e022e4a31fb2216082, 3dc749d641b2544d95bef446bf1602dc35d191a3 and acc00eeb68bf7f3cb43119b0163ab5004b0f4441

Will be released in 0.7.2