Mock GPIO class handles setting input/output correctly