title: How to Mock the value of a variable using unittest which is being used in another python file
body: <p>I have the following file <code>constants.py</code></p>
  <pre class="lang-py prettyprint-override"><code># Here all the constants are written
  variable_name = False
  ...
  </code></pre>
  <p>The above variable <strong>variable_name</strong> from <code>constants.py</code> is being used in another file <code>b.py</code></p>
  <pre class="lang-py prettyprint-override"><code>#b.py
  
  import constants
  def func():
     if constants.variable_name:
         &quot;&quot;&quot; Do Something &quot;&quot;&quot;
     else:
         &quot;&quot;&quot; Do Something &quot;&quot;&quot;
  </code></pre>
  <p>Here, how can I mock the <em>variable_name</em> from <code>constants.py</code> to <code>True</code> to test the <code>if</code> condition of the function <code>func</code> using unittest?</p>