Пример #1
0
 def test_wraps_multiple_things_in_proxy_deprecated(self):
     with warnings.catch_warnings():
         warnings.filterwarnings("ignore", category=DeprecationWarning)
         obj1 = fudge.Fake().expects('func').returns(DID_NOT_HANDLE)
         obj2 = fudge.Fake().provides('func').returns(2)
         m = MultipleBackendProxy(obj1, obj2)
         self.assertEqual(m.func(), 2)
Пример #2
0
 def test_wraps_multiple_things_in_proxy(self):
     obj1 = fudge.Fake().expects('func').raises(BackendDidNotHandle)
     obj2 = fudge.Fake().provides('func').returns(2)
     m = MultipleBackendProxy(obj1, obj2)
     self.assertEqual(m.func(), 2)