title: How can I fake a missing dependency for unit testing in python?
body: <p>I have written a python module that depends on a third-party package that isn't available on my CI testing machine, so I can't test my module remotely because I can't get past the <code>import dependency</code> statement.</p>
  
  <p>If we assume there's no way I can just manually install the dependency (seems like a pain) on the CI host, what's the easiest way to fake/mock/whatever the missing third-party package so that I can test my code?</p>
  
  <p>I'm only using a single class provided by the dependency, so I would happily just mock that object, if there's a way to just do that, instead of the whole module.</p>