fix persona tests by using a correct query

This commit is contained in:
Rodney Ewing 2013-08-15 17:36:56 -07:00
parent fc714df00d
commit 71b2bee622

View File

@ -108,13 +108,13 @@ class TestPersonaPlugin(object):
persona_plugin_app.get('/auth/logout/')
# Get user and detach from session
test_user = mg_globals.database.User.find_one({
'username': u'chris'})
test_user = mg_globals.database.User.query.filter_by(
username=u'chris').first()
test_user.email_verified = True
test_user.status = u'active'
test_user.save()
test_user = mg_globals.database.User.find_one({
'username': u'chris'})
test_user = mg_globals.database.User.query.filter_by(
username=u'chris').first()
Session.expunge(test_user)
# Add another user for _test_edit_persona