Switch to side-by-side view

--- a/Allura/allura/tests/functional/test_auth.py
+++ b/Allura/allura/tests/functional/test_auth.py
@@ -36,11 +36,10 @@
 
     @td.with_user_project('test-admin')
     def test_prefs(self):
-        r = self.app.get('/auth/prefs/')
+        r = self.app.get('/auth/prefs/', extra_environ=dict(username='test-admin'))
         assert 'test@example.com' not in r
-        mailboxes = M.Mailbox.query.find(dict(user_id=c.user._id, is_flash=False))
+        subscriptions = M.Mailbox.query.find(dict(user_id=c.user._id, is_flash=False)).all()
         # make sure page actually lists all the user's subscriptions
-        subscriptions = list(mailboxes.ming_cursor)
         assert len(subscriptions) > 0, 'Test user has no subscriptions, cannot verify that they are shown'
         for m in subscriptions:
             assert m._id in r, "Page doesn't list subscription for Mailbox._id = %s" % m._id
@@ -48,8 +47,9 @@
                  'display_name':'Test Admin',
                  'new_addr.addr':'test@example.com',
                  'new_addr.claim':'Claim Address',
-                 'primary_addr':'Beta@wiki.test.projects.sourceforge.net',
-                 'preferences.email_format':'plain'})
+                 'primary_addr':'test-admin@users.localhost',
+                 'preferences.email_format':'plain'},
+                extra_environ=dict(username='test-admin'))
         r = self.app.get('/auth/prefs/')
         assert 'test@example.com' in r
         r = self.app.post('/auth/prefs/update', params={
@@ -58,19 +58,21 @@
                  'addr-2.ord':'1',
                  'addr-2.delete':'on',
                  'new_addr.addr':'',
-                 'primary_addr':'Beta@wiki.test.projects.sourceforge.net',
-                 'preferences.email_format':'plain'})
+                 'primary_addr':'test-admin@users.localhost',
+                 'preferences.email_format':'plain'},
+                extra_environ=dict(username='test-admin'))
         r = self.app.get('/auth/prefs/')
         assert 'test@example.com' not in r
-        ea = M.EmailAddress.query.get(_id='Beta@wiki.test.projects.sourceforge.net')
+        ea = M.EmailAddress.query.get(_id='test-admin@users.localhost')
         ea.confirmed = True
         ThreadLocalORMSession.flush_all()
         r = self.app.post('/auth/prefs/update', params={
                  'display_name':'Test Admin',
-                 'new_addr.addr':'Beta@wiki.test.projects.sourceforge.net',
+                 'new_addr.addr':'test-admin@users.localhost',
                  'new_addr.claim':'Claim Address',
-                 'primary_addr':'Beta@wiki.test.projects.sourceforge.net',
-                 'preferences.email_format':'plain'})
+                 'primary_addr':'test-admin@users.localhost',
+                 'preferences.email_format':'plain'},
+                extra_environ=dict(username='test-admin'))
 
     def test_api_key(self):
          r = self.app.get('/auth/prefs/')