Replace fanout to False for CastAsCall fixture
In I5f9e74f46e347594103484460e81da46835eeb7e, a new Fixture has been added for changing oslo.messaging casts to calls. That said, it leads to a point where fanout casts are then mapped to fanout calls, which are not yet implemented (and somewhat conceptually hard to consider). Here, we're asserting that if a fanout cast is made using that fixture, it will be properly turned into a non-fanout call, which works because there is only one ServiceManager listening to the topic in the tests. Co-Authored-By: EdLeafe <ed@leafe.com> Change-Id: I1febc24ec0c09c3c17511e7ab1f2d7b6a05b6937
This commit is contained in:
		@@ -37,6 +37,10 @@ class CastAsCall(fixtures.Fixture):
 | 
			
		||||
        orig_prepare = obj.prepare
 | 
			
		||||
 | 
			
		||||
        def prepare(self, *args, **kwargs):
 | 
			
		||||
            # Casts with fanout=True would throw errors if its monkeypatched to
 | 
			
		||||
            # the call method, so we must override fanout to False
 | 
			
		||||
            if 'fanout' in kwargs:
 | 
			
		||||
                kwargs['fanout'] = False
 | 
			
		||||
            cctxt = orig_prepare(self, *args, **kwargs)
 | 
			
		||||
            CastAsCall._stub_out(stubs, cctxt)  # woo, recurse!
 | 
			
		||||
            return cctxt
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user