comparison test/test_cgi.py @ 4485:95aace124a8e

use idea from Eli Collins to use a list of deprecated password encoding schemes
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Thu, 14 Apr 2011 18:27:51 +0000
parents 52e13bf0bb40
children 693c75d56ebe
comparison
equal deleted inserted replaced
4484:52e13bf0bb40 4485:95aace124a8e
429 chef = self.db.user.lookup('Chef') 429 chef = self.db.user.lookup('Chef')
430 form = dict(__login_name='Chef', __login_password='foo') 430 form = dict(__login_name='Chef', __login_password='foo')
431 cl = self._make_client(form) 431 cl = self._make_client(form)
432 # assume that the "best" algorithm is the first one and doesn't 432 # assume that the "best" algorithm is the first one and doesn't
433 # need migration, all others should be migrated. 433 # need migration, all others should be migrated.
434 for scheme in password.Password.known_schemes[1:]: 434 for scheme in password.Password.deprecated_schemes:
435 pw1 = password.Password('foo', scheme=scheme) 435 pw1 = password.Password('foo', scheme=scheme)
436 self.assertEqual(pw1.needs_migration(), True) 436 self.assertEqual(pw1.needs_migration(), True)
437 self.db.user.set(chef, password=pw1) 437 self.db.user.set(chef, password=pw1)
438 self.db.commit() 438 self.db.commit()
439 actions.LoginAction(cl).handle() 439 actions.LoginAction(cl).handle()

Roundup Issue Tracker: http://roundup-tracker.org/