'Mock windows includes.'

def SetupWinEnvironment(self):

    winreg = imp.new_module('_winreg')
    winreg.error = exceptions.Exception
    sys.modules['_winreg'] = winreg
    ntsecuritycon = imp.new_module('ntsecuritycon')
    sys.modules['ntsecuritycon'] = ntsecuritycon
    pywintypes = imp.new_module('pywintypes')
    pywintypes.error = Exception
    sys.modules['pywintypes'] = pywintypes
    winfile = imp.new_module('win32file')
    winfile.GetVolumeNameForVolumeMountPoint = GetVolumeNameForVolumeMountPoint
    winfile.GetVolumePathName = GetVolumePathName
    sys.modules['win32file'] = winfile
    win32security = imp.new_module('win32security')
    sys.modules['win32security'] = win32security
    win32api = imp.new_module('win32api')
    sys.modules['win32api'] = win32api
    win32service = imp.new_module('win32service')
    sys.modules['win32service'] = win32service
    win32serviceutil = imp.new_module('win32serviceutil')
    sys.modules['win32serviceutil'] = win32serviceutil
    winerror = imp.new_module('winerror')
    sys.modules['winerror'] = winerror
