Switch to side-by-side view

--- a/Allura/allura/tests/test_tasks.py
+++ b/Allura/allura/tests/test_tasks.py
@@ -99,7 +99,7 @@
 
     def test_send_email(self):
         c.user = M.User.by_username('test-admin')
-        with mock.patch_object(mail_tasks.smtp_client, 'sendmail') as f:
+        with mock.patch.object(mail_tasks.smtp_client, 'sendmail') as f:
             mail_tasks.sendmail(
                 str(c.user._id),
                 [ str(c.user._id) ],
@@ -121,7 +121,7 @@
     def test_receive_email_ok(self):
         c.user = M.User.by_username('test-admin')
         import forgewiki
-        with mock.patch_object(forgewiki.wiki_main.ForgeWikiApp, 'handle_message') as f:
+        with mock.patch.object(forgewiki.wiki_main.ForgeWikiApp, 'handle_message') as f:
             mail_tasks.route_email(
                 '0.0.0.0', c.user.email_addresses[0],
                 ['Page@wiki.test.p.in.sf.net'],
@@ -137,8 +137,8 @@
         setup_global_objects()
 
     def test_delivers_messages(self):
-        with mock.patch_object(M.Mailbox, 'deliver') as deliver:
-            with mock.patch_object(M.Mailbox, 'fire_ready') as fire_ready:
+        with mock.patch.object(M.Mailbox, 'deliver') as deliver:
+            with mock.patch.object(M.Mailbox, 'fire_ready') as fire_ready:
                 notification_tasks.notify('42', '52', 'none')
                 assert deliver.called_with('42', '52', 'none')
                 assert fire_ready.called_with()
@@ -155,7 +155,7 @@
 
     def test_init(self):
         ns = M.Notification.query.find().count()
-        with mock.patch_object(c.app.repo, 'init') as f:
+        with mock.patch.object(c.app.repo, 'init') as f:
             repo_tasks.init()
             M.main_orm_session.flush()
             assert f.called_with()
@@ -163,19 +163,19 @@
 
     def test_clone(self):
         ns = M.Notification.query.find().count()
-        with mock.patch_object(c.app.repo, 'init_as_clone') as f:
+        with mock.patch.object(c.app.repo, 'init_as_clone') as f:
             repo_tasks.clone('foo', 'bar', 'baz')
             M.main_orm_session.flush()
             f.assert_called_with('foo', 'bar', 'baz')
             assert ns + 1 == M.Notification.query.find().count()
 
     def test_refresh(self):
-        with mock.patch_object(c.app.repo, 'refresh') as f:
+        with mock.patch.object(c.app.repo, 'refresh') as f:
             repo_tasks.refresh()
             f.assert_called_with()
 
     def test_uninstall(self):
-        with mock.patch_object(shutil, 'rmtree') as f:
+        with mock.patch.object(shutil, 'rmtree') as f:
             repo_tasks.uninstall()
             f.assert_called_with('/tmp/svn/p/test/src', ignore_errors=True)