should use "and" operator rather than "or"
Otherwise the test fails if ".*" is not part of self.allowedExtensions	

if self._getExtensionFromFileName(filename) not in self.allowedExtensions and ".*" not in self.allowedExtensions: