def __init__(self, cache): # Translators: the %s is a distro name, like 'Ubuntu' and 'base' as in # the core components and packages. name = _("%s base") % utils.get_ubuntu_flavor_name(cache=cache) icon = Gio.ThemedIcon.new("distributor-logo") super(UpdateSystemGroup, self).__init__(None, name, icon)
def test_flavor_name_studio(self, mock_package): mock_package.return_value = 'ubuntustudio-desktop' self.assertEqual(utils.get_ubuntu_flavor_name(), 'Ubuntu Studio')
def test_flavor_name_netbook(self, mock_package): mock_package.return_value = 'something-netbook' self.assertEqual(utils.get_ubuntu_flavor_name(), 'Something')
def test_flavor_name_desktop(self, mock_package): mock_package.return_value = 'something-desktop' self.assertEqual(utils.get_ubuntu_flavor_name(), 'Something')