title: How to configure properly unit testing with Errbot?
body: <p>I tried to follow this guide <a href="http://errbot.io/en/latest/user_guide/plugin_development/testing.html" rel="nofollow noreferrer">http://errbot.io/en/latest/user_guide/plugin_development/testing.html</a></p>
  
  <p>I installed <code>pytest</code> and launch it with</p>
  
  <pre><code>pytest --rootdir='./srv/plugins'
  </code></pre>
  
  <p>but I have this following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "./errbot/app/venv/lib/python3.4/site-packages/errbot/backends/graphic.py", line 19, in &lt;module&gt;
      from PySide import QtCore, QtGui, QtWebKit
  ImportError: No module named 'PySide'
  2018-06-11 16:30:44,930 CRITICAL errbot.backends.graphic    To install graphic support use:
      pip install errbot[graphic]
  </code></pre>
  
  <p>It looks like <code>pytest</code> tries to run Errbot in graphical mode whereas I am using Errbot with a text backend just fine.</p>
  
  <p>As the plugins might need at some point to use the configuration file given to Errbot, I wonder how to do the same while using <code>pytest</code>...</p>
  
  <p>I reproduce on the host the arboresence found on a <a href="https://github.com/rroemhild/docker-errbot" rel="nofollow noreferrer">Docker image</a></p>
  
  <pre><code>errbot
      app
          venv
          config.py
          requirements.txt
      srv
          data
          errbackends
          plugins
              Samples
                  samples.plug
                  samples.py
      run.sh
  </code></pre>
  
  <p>Then, I run <code>errbot</code> with a my backend - in my case Mattermost - like this:</p>
  
  <pre><code>./run.sh -c ./app/config.py
  </code></pre>
  
  <p>And for the <code>text</code> as backend</p>
  
  <pre><code>./run.sh -c ./app/config.py --text
  </code></pre>
  
  <p>In <code>run.sh</code>, I inject some environment variables and activate <code>venv</code> before calling <code>errbot</code>.</p>
  
  <p>Actually, I could reproduce my issue on the unit testing by launching <code>errbot</code> in graphical mode</p>
  
  <pre><code>./run.sh -c ./app/config.py --graphic
  </code></pre>
  
  <p>Therefore, I wonder how to inject the right config for the unit tests as I can do while running <code>errbot</code>.</p>