sehmaschine/django-filebrowser — Issue #80: Cannot pass test
Author: PaoloC68
Created: 2012-02-29 02:21:32+00:00
State: open

Python 2.6.4
>>> django.VERSION
(1, 3, 1, 'final', 0)
>>> grappelli.VERSION
'2.3.7'
>> filebrowser.VERSION
'3.4.1'

settings.py

import os
PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('root', 'root@example.com'),
)

MANAGERS = ADMINS

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'database.db',
}
}
TIME_ZONE = 'America/Chicago'
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
SE_I18N = True
USE_L10N = True
MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
STATIC_ROOT = os.path.join(PROJECT_DIR, 'static')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = STATIC_URL + "grappelli/"
STATICFILES_DIRS = (
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
SECRET_KEY = 'iqg6mewxg-ah-rszjcg4=ml=haufrt3_h!+%c9d**_uf!gb_^o'
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
ROOT_URLCONF = 'filebrowsertest.urls'
TEMPLATE_DIRS = (
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'grappelli',
'filebrowser',
'django.contrib.admin',
)
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}

urls.py

from django.conf.urls.defaults import patterns, include, url
from filebrowser.sites import site
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
url(r'^admin/filebrowser/', include(site.urls)),
url(r'^grappelli/', include('grappelli.urls')),
url(r'^admin/', include(admin.site.urls)),
)

when I run
python manage.py test filebrowser

got this:

Creating Test for the FileBrowser site: filebrowser
Creating test database for alias 'default'...
..................FRemoving left-over tmp dir: uploads/tmp_test_0

======================================================================
FAIL: runTest (filebrowser.tests.sites.TestSite_filebrowser)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/www/stompenv/lib/python2.6/site-packages/django_filebrowser-3.4.1-py2.6.egg/filebrowser/tests/sites.py", line 232, in runTest
test_detail(self)
File "/var/www/stompenv/lib/python2.6/site-packages/django_filebrowser-3.4.1-py2.6.egg/filebrowser/tests/sites.py", line 139, in test_detail
test.assertTrue(test.site.storage.exists(path))
AssertionError: False is not True

----------------------------------------------------------------------
Ran 19 tests in 0.750s

FAILED (failures=1)