def test_get_identifier_returns_none(self): """get_identifier should return None if no identifier is found.""" recipe = plistlib.loads(self.download_recipe.encode("utf-8")) del recipe["Identifier"] id = autopkglib.get_identifier(recipe) self.assertIsNone(id)
def test_get_identifier_returns_none(self): """get_identifier should return None if no identifier is found.""" recipe = plistlib.readPlistFromString(self.download_recipe) del recipe["Identifier"] id = autopkglib.get_identifier(recipe) self.assertIsNone(id)
def test_get_identifier_returns_identifier(self): """get_identifier should return the identifier.""" recipe = plistlib.loads(self.download_recipe.encode("utf-8")) id = autopkglib.get_identifier(recipe) self.assertEqual(id, "com.github.autopkg.download.googlechrome")
def test_get_identifier_returns_identifier(self): """get_identifier should return the identifier.""" recipe = plistlib.readPlistFromString(self.download_recipe) id = autopkglib.get_identifier(recipe) self.assertEqual(id, "com.github.autopkg.download.googlechrome")