Spy on function #10290
              
                Unanswered
              
          
                  
                    
                      Rachel-Rabinowitz
                    
                  
                
                  asked this question in
                Q&A
              
            
            
              Spy on function
            
            #10290
          
          
        Replies: 1 comment 1 reply
-
| 
        
 Yes, you have to mock  def test_a(mocker):
    mocker.patch("app.module.C", return_value=42)
    ... | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have something like this:
I want to test A and mock the return value of C
Is there any way to do that?
Beta Was this translation helpful? Give feedback.
All reactions