Fixing one test post-merge. We got rid of the mongo stuff, so... consistency!
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 20 Sep 2013 14:51:24 +0000 (09:51 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 20 Sep 2013 14:51:24 +0000 (09:51 -0500)
Now we can merge LDAP support!  Woohoo!

This commit sponsored by the ever-awesome GMG contributor, Sebastian
Spaeth.  Thanks!

mediagoblin/tests/test_ldap.py

index 2f9a1372c2020651d5c8f6b8d117f90ffa6cd381..708ce6cb6adf97ea0ed5beb6b29d01b576e86708 100644 (file)
@@ -102,8 +102,8 @@ def test_ldap_plugin(ldap_plugin_app):
         ldap_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()
         Session.expunge(test_user)
 
         # Log back in