From 71b2bee6228164993394f74202e5acd82535c34d Mon Sep 17 00:00:00 2001 From: Rodney Ewing Date: Thu, 15 Aug 2013 17:36:56 -0700 Subject: [PATCH] fix persona tests by using a correct query --- mediagoblin/tests/test_persona.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mediagoblin/tests/test_persona.py b/mediagoblin/tests/test_persona.py index 1d03ea7f..ce795258 100644 --- a/mediagoblin/tests/test_persona.py +++ b/mediagoblin/tests/test_persona.py @@ -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 -- 2.25.1