How to mock class used in separate namespace?
<p>Package Structure:</p>

<pre><code>pqr/pq.py
test.py
</code></pre>

<p><code>pqr/pq.py</code> has following structure</p>

<p>Where lmn is globally installed pip module</p>

<p>Structure of <code>pq.py</code></p>

<pre><code>from lmn import Lm

class Ab():

    def __init__(self):
        self.lm = Lm()

    def echo(self, msg):
        print msg
</code></pre>

<p><code>test.py</code> has following structure</p>

<pre><code>from pqr.pq import Ab
</code></pre>

<p>How to mock <code>Lm()</code> class over here so to test all method from Ab class?</p>