I am struggling to mock a method inside another method i.e Let's say I have 2 classes A, B as follows:
class A:
def method_A(self):
return "Hi"
class B:
def method_B(self):
instance_A = A()
result = instance_A.method_A()
print(result)
Here I want to mock method_A while testing method_B but can't find a way. Thanks in advance