2 messages in com.googlegroups.pylons-discussRe: Problems with http://pylonshq.com...
FromSent OnAttachments
Agustín (Cucho) Villena24 Apr 2007 15:18 
Shannon -jj Behrens27 Apr 2007 17:18 
Subject:Re: Problems with http://pylonshq.com/docs/0.9.5/testing_web_application.html
From:Shannon -jj Behrens (jjin@public.gmane.org)
Date:04/27/2007 05:18:35 PM
List:com.googlegroups.pylons-discuss

On 4/24/07, Agustín (Cucho) Villena
<agus@public.gmane.org> wrote:

HI all!

I recently worked thorugh the testing tutorial at http://pylonshq.com/docs/0.9.5/testing_web_application.html, and found following issues:

When I tried to test objects, as seen at the end of the tutorial, I received the following error:

The offending code

from testexample.tests import *

class TestCommentsController(TestController): def test_index(self): response = self.app.get(url_for(controller='/')) assert response.email.name == 'Fred Smith'

$ nosetests ... Traceback (most recent call last): File "/home/avillena/TestExample/testexample/tests/functional/ test_controller.py", line 7, in test_index assert response.email.name == 'Fred Smith' AttributeError: 'TestResponse' object has no attribute 'email'

Do you have a form field with an id of email?

I have tested this issue in Windows with Python 2.5 and Linux with Python 2.4.2

The second issue is that the tutorial says that paste.fixture doesn't work in Windows, but the tutorial behaves equally on both platforms...

Any help?

Hmm, I wonder why it says that. Maybe Ian knows.

Happy Hacking! -jj