Description: Fix tests for plainbox.impl.proxy
 This is another of the mock bugs that laid dormant while mock was silently
 allowing mock.assert_ methods that didn't exist. This patch can be dropped
 with the next release of plainbox as padme (upstream for this proxy) has been
 added as a dependency and upstream already contains this fix.
Author: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Origin: upstream
Forwarded: not-needed
Last-Update: 2015-09-02

--- plainbox-0.22.2.orig/plainbox/impl/test_proxy.py
+++ plainbox-0.22.2/plainbox/impl/test_proxy.py
@@ -276,13 +276,16 @@ class proxy_as_function(unittest.TestCas
 
     def test_context_manager_methods_v2(self):
         exc = Exception("boom")
+        exc_info = ()
         with self.assertRaisesRegex(Exception, "boom"):
-            with self.proxy:
-                raise exc
+            try:
+                with self.proxy:
+                    raise exc
+            except Exception:
+                exc_info = sys.exc_info()
+                raise
         self.obj.__enter__.assert_called_once_with()
-        # XXX: it's called with (Exception, exc, traceback) but I don't know
-        # how to reach the traceback here
-        self.obj.__exit__.assert_called_once
+        self.obj.__exit__.assert_called_once_with(*exc_info)
 
     def test_hasattr_parity(self):
         class C():
