Unit testing is all about abstracting / mocking out all the modules connected to the unit you are testing & just test your unit.
If you are programming in python, http://www.voidspace.org.uk/python/mock/ would be the most preferred way of mocking out other external units connected to your unit under test.
If you are programming in python, http://www.voidspace.org.uk/python/mock/ would be the most preferred way of mocking out other external units connected to your unit under test.
http://alexmarandon.com/articles/python_mock_gotchas/ should make you an expert on mocking