Ticket #2454 (new defect)

Opened 2 months ago

Need regression tests for authentication, particularly with non-ascii user names and passwords

Reported by: chrisz Assigned to:
Priority: normal Milestone: 2.1
Component: TurboGears Version: trunk
Severity: normal Keywords: tests
Cc:

Description

When #2438, #2452 and #2453 are fixed, we should also add regression tests for authentication with non-ascii user names and passwords.

Unfortunately, I cannot even get the standard functional tests passing, probably because of changes in webob, weberrors and webtest. We need to get this fixed first.

For instance, test_authentication.test_forced_login is failing for me with

>>  assert resp.location.startswith('http://localhost/login')

because resp.location is missing the http://localhost part.

I also get an error because the 'authkt' cookie has double quotes around "INVALID".

And after fixing all of these, I still am still getting strage errors such as

AssertionError: Content-Length is different from actual app_iter length (301!=260)
    "Content-Length is different from actual app_iter length (%r!=%r)"
>>  % (self.content_length, len('401 Unauthorized\nThis server could not verify that you are authorized to\r\naccess t
he document you requested.  Either you supplied the\nwrong credentials (e.g., bad password), or your browser\r\ndoes n
ot understand how to supply the credentials required.\n\n\n\n'))