Reduce duplicate matches - ensures compatibility Responses 0.19.0 (#4914)
This commit is contained in:
		
							parent
							
								
									16a3f49004
								
							
						
					
					
						commit
						7001ec60df
					
				@ -10,6 +10,10 @@ class CustomRegistry(responses.registries.FirstMatchRegistry):
 | 
			
		||||
     - CallbackResponses are not discarded after first use - users can mock the same URL as often as they like
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
    def add(self, response):
 | 
			
		||||
        if response not in self.registered:
 | 
			
		||||
            super().add(response)
 | 
			
		||||
 | 
			
		||||
    def find(self, request):
 | 
			
		||||
        all_possibles = responses._default_mock._registry.registered + self.registered
 | 
			
		||||
        found = []
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user