lfc test suite fails

7 views
Skip to first unread message

Barry

unread,
Mar 28, 2011, 11:00:54 AM3/28/11
to django-lfc
I've just got lfc running from the lfc-buildout-development system but
with my fork of lfc in place. Currently its identical to the default
lfc.

I can run the local server and see a nice lfc standard portal page all
ready for some content, so that's great.

But before I start hacking away, I wanted to run the test suite. So I
do "bin/django test", and the bottom line is:

FAILED (failures=17, errors=49)

Not all the errors are from lfc - the first one is:

ERROR: test_current_site_in_context_after_login
(django.contrib.auth.tests.views.LoginTest)
[traceback deleted]
File "/home/rowlings/Web/CMS/Buildout/lfc-buildout-development/parts/
django/django/db/models/query.py", line 159, in __getitem__
return list(qs)[0]
IndexError: list index out of range

which is from django core, but there's also errors from workflows,
portlets, permissions and lfc. Such as:

FAIL: test_get_children (lfc.tests.page_tests.PageTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rowlings/Web/CMS/Buildout/lfc-buildout-development/parts/
lfc/lfc/tests/page_tests.py", line 233, in test_get_children
self.assertEqual(result, True)
AssertionError: False != True

Are these all known problems? (I can upload my full error log if
needed) Or is something seriously wrong? I'd hoped the buildout system
would have made sure I had compatible versions of everything. I've run
the test suite without another django instance running on the system
in case that can cause problems.

Am eager to get hacking.... any ideas?

Barry

Kai Diefenbach

unread,
Mar 28, 2011, 11:28:20 AM3/28/11
to djang...@googlegroups.com
Hi, 

Am 28.03.2011 um 17:00 schrieb Barry:

I've just got lfc running from the lfc-buildout-development system but
with my fork of lfc in place. Currently its identical to the default
lfc.

But before I start hacking away, I wanted to run the test suite. So I
do "bin/django test", and the bottom line is:

FAILED (failures=17, errors=49)

Not all the errors are from lfc - the first one is:

You should run 

$ bin/dango test lfc

to get the LFS specific failures.

Are these all known problems? (I can upload my full error log if
needed) Or is something seriously wrong? I'd hoped the buildout system
would have made sure I had compatible versions of everything. I've run
the test suite without another django instance running on the system
in case that can cause problems.

I don't think that something is wrong. I made a lot of changes without adapting the tests (yes, i know this is bad style).

Am eager to get hacking.... any ideas?

I would be more than happy if someone (you?) would adapt the tests and/or fix the bugs.

Kai

--
IQ++
Tel: +49 361 / 6636700
Fax: +49 361 / 6636702
Mail: kai.die...@iqpp.de
Web: http://www.iqpp.de
Skype: kai.diefenbach

Barry

unread,
Mar 28, 2011, 11:44:38 AM3/28/11
to django-lfc
On Mar 28, 4:28 pm, Kai Diefenbach <kai.diefenb...@iqpp.de> wrote:

> You should run
>
>         $ bin/dango test lfc
>
> to get the LFS specific failures.

That gets me down to:

FAILED (failures=10, errors=13)

but I am wary about running tests on a django app when I know there
are fails in tests of apps it depends on (and which are nothing to do
with lfc).

> I would be more than happy if someone (you?) would adapt the tests and/or fix the bugs.

My approach would be "rm -rf tests/*" which is even worse style! :)

Will brush up on my python debugging skills and am reading up more
about the django test framework...

Thanks,

Barry

Barry

unread,
Mar 28, 2011, 12:58:34 PM3/28/11
to django-lfc
At least one of the fails (in permission_tests.py, I'm just randomly
picking at them) is due to the Client returning a response 302 when
the test is for a 200. The 302 is redirecting to the login URL (http://
testserver/login?next=/manage/1), even though the new 'reviewer' user
has been successfully created and logged in...

Probably wont have a chance to look at all this for another week now.

Barry


Barry

unread,
Mar 28, 2011, 1:11:48 PM3/28/11
to django-lfc
So now I'm guessing this may be a problem with the workflow module,
with the reviewer user not having the correct permissions, so I
suppose I have to fix all those test fails first....

Kai Diefenbach

unread,
Apr 12, 2011, 3:28:39 AM4/12/11
to django-lfc
In the meanwhile I found that for any reason with Django 1.1.1. the
test Client can't login an hence a lot of test are failing.

I fixed this within LFC 1.0.3. (Using Django 1.1.4) and all tests
should be passing now (at least here they are).

This should be also true for the development trunk.

Kai
Reply all
Reply to author
Forward
0 new messages