def test_get_s60_env_details_valid(self): """Verifiying get_s60_env_details(valid args) method""" (fileDes, cacheFilename) = tempfile.mkstemp() resultname = idoprep.get_s60_env_details( self.server, "service", "product", "release_1", "(?:_\\d{3})?", cacheFilename, 1, None ) os.close(fileDes) os.unlink(cacheFilename) assert resultname[0] is not None
def test_get_version_valid(self): """Verifiying get_version method""" (fileDes, cacheFilename) = tempfile.mkstemp() result = idoprep.get_s60_env_details( self.server, "service", "product", "release_1", "(?:_\\d{3})?", cacheFilename, None, None ) versionFilename = os.path.join(tempfile.gettempdir(), "s60_version.txt") versionFile = open(versionFilename, "w") resultname = os.path.basename(result[0]) versionFile.write(resultname) versionFile.close() version = idoprep.get_version(tempfile.gettempdir(), resultname) os.close(fileDes) os.unlink(cacheFilename) os.unlink(versionFilename) assert version.strip() == resultname