I have a Raspberry Pi project written in Python that uses RPi.GPIO module. All the work on the code is done on a Windows box where RPi.GPIO will not install and every time I
Besides mocking modules, I also had to mock calls that only made sense in my embedded system (for example mocking a call to a function read_reg() from the module examplemod that reads a register from an FPGA via SPI).
import mox as mox
import examplemod
m = mox.Mox()
m.StubOutWithMock(examplemod, 'read_reg')
Note that you need python-mox: sudo apt-get install python-mox
Reference: How to generate sphinx documentation for python code running in an embedded system