File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -167,8 +167,6 @@ class AopProxy(object):
167167 lookups are not intercepted, but instead fetched from the actual target object."""
168168
169169 def __init__ (self , target , interceptors ):
170- if type (target ).__name__ != "instance" :
171- raise Exception ("Target attribute must be an instance." )
172170 self .target = target
173171 if type (interceptors ) == list :
174172 self .interceptors = interceptors
Original file line number Diff line number Diff line change @@ -61,9 +61,9 @@ def testCreatingAopProxyFactoryAndAddingInterceptorToNewStyleClassProgammaticall
6161 factory .target = NewStyleSampleService ()
6262 factory .interceptors .append (WrappingInterceptor ())
6363 service = factory .getProxy ()
64- self .assertEquals ("<Wrapped>Alright !</Wrapped>" , service .doSomething ())
65- self .assertEquals ("<Wrapped>You made it! => test</Wrapped>" , service .method ("test" ))
66- self .assertEquals ("sample " , service .attribute )
64+ self .assertEquals ("<Wrapped>Even better !</Wrapped>" , service .doSomething ())
65+ self .assertEquals ("<Wrapped>You made it to a new style class ! => test</Wrapped>" , service .method ("test" ))
66+ self .assertEquals ("new_sample " , service .attribute )
6767
6868 def testCreatingAProxyFactoryAndAddingAnInterceptorIoC (self ):
6969 factory = self .appContext .get_object ("factory" )
You can’t perform that action at this time.
0 commit comments