Fix tests failed without pywin32 module