Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2067 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

TG2 auth tests failing

Reported by: mramm Owned by: Gustavo
Priority: normal Milestone: 2.0b1
Component: TurboGears Version: trunk
Severity: normal Keywords:
Cc:

Description (last modified by mramm) (diff)

I was getting 12 errors from the TG2 test suite all from the auth tests.

The errors were:

  File "/.../site-packages/repoze.who-1.0.7-py2.5.egg/repoze/who/plugins/auth_tkt.py",
     line 64, in identify tokens = environ['REMOTE_USER_TOKENS'] + ',' + tokens
TypeError: can only concatenate list (not "str") to list

Apparently REMOTE_USER_TOKENS was set to [''] in all cases.

I was able to hack around this error by replacing lthe above line with:

        remote_user_tokens = environ.get('REMOTE_USER_TOKENS')
        if remote_user_tokens and (len(remote_user_tokens) >1 or remote_user_tokens[0])
            ....

But it seems like the code there is expecting a string when a list is present, so this is not a real fix, just a crazy hack. So something smarter needs to be done here.

Also these tests were all passing earlier in this week, so whatever caused the errors must have been checked into trunk this week.

Change History

comment:1 Changed 10 years ago by mramm

  • Description modified (diff)

comment:2 Changed 10 years ago by mramm

  • Owner changed from faide to Gustavo

comment:3 Changed 10 years ago by Gustavo

  • Status changed from new to assigned

Hi, Mark.

This is the output I get:

(tg2)valencia ~/Projeti/TG2: svn up
At revision 5861.
(tg2)valencia ~/Projeti/TG2: nosetests
/home/gustavo/System/Pyenvs/tg2/lib/python2.5/site-packages/PasteScript-1.6.3-py2.5.egg/paste/script/appinstall.py:17: ImportWarning: Not importing directory '/home/gustavo/System/Pyenvs/tg2/lib/python2.5/site-packages/PasteScript-1.6.3-py2.5.egg/paste/script/templates': missing __init__.py
  import paste.script.templates
..................../home/gustavo/System/Pyenvs/tg2/lib/python2.5/site-packages/Pylons-0.9.7rc1-py2.5.egg/pylons/templating.py:335: DeprecationWarning: pylons.h is deprecated: use your project's lib.helpers module directly instead. Your lib/helpers.py may require the following additional imports:

    from pylons.helpers import log
    from pylons.i18n import get_lang, set_lang

Use the following in your project's lib/base.py file (and any other module that
uses h):

    import MYPROJ.lib.helpers as h

(where MYPROJ is the name of your project) instead of:

    from pylons import h

  globs.update(pylons_globals())
.................../home/gustavo/System/Pyenvs/tg2/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc4-py2.5.egg/sqlalchemy/orm/scoping.py:121: SAPendingDeprecationWarning: Use session.add()
  return getattr(self.registry(), name)(*args, **kwargs)
...........................
----------------------------------------------------------------------
Ran 66 tests in 1.019s

OK

Are you using repoze.who-1.0.7, repoze.what-1.0rc1 and repoze.what.plugins.sql-1.0a2?

Cheers.

comment:4 Changed 10 years ago by mramm

  • Status changed from assigned to closed
  • Resolution set to fixed

Updating repoze.what in my virtualenv resolved the problem.

Note: See TracTickets for help on using tickets.