Exemplo n.º 1
0
 def disabled_for_now_test_where_is_it_in_system(self):
     app = Application("Hardware Drivers", "jockey-gtk")
     details = app.get_details(self.db)
     self.assertEqual(details.desktop_file, "/usr/share/app-install/desktop/jockey-gtk.desktop")
     # search the settings menu
     searcher = GMenuSearcher()
     found = searcher.get_main_menu_path(details.desktop_file)
     self.assertEqual(found[0].get_name(), "Desktop")
     self.assertEqual(found[0].get_icon(), "preferences-other")
     self.assertEqual(found[1].get_name(), "Administration")
     self.assertEqual(found[1].get_icon(), "preferences-system")
Exemplo n.º 2
0
 def test_where_is_it_kde4(self):
     app = Application("", "ark")
     details = app.get_details(self.db)
     self.assertEqual(details.desktop_file, "/usr/share/app-install/desktop/ark:kde4__ark.desktop")
     # search the settings menu
     searcher = GMenuSearcher()
     found = searcher.get_main_menu_path(details.desktop_file, [os.path.abspath("./data/fake-applications.menu")])
     self.assertEqual(found[0].get_name(), "Applications")
     self.assertEqual(found[0].get_icon().get_names()[0], "applications-other")
     self.assertEqual(found[1].get_name(), "Accessories")
     self.assertEqual(found[1].get_icon().get_names()[0], "applications-utilities")
Exemplo n.º 3
0
 def test_where_is_it_real_system(self):
     app = Application("", "gedit")
     details = app.get_details(self.db)
     if details.pkg_state != PkgStates.INSTALLED:
         logging.warn("gedit not installed, skipping real menu test")
         self.skipTest("gedit not installed")
         return
     self.assertEqual(details.desktop_file, "/usr/share/app-install/desktop/gedit:gedit.desktop")
     # search the *real* menu
     searcher = GMenuSearcher()
     found = searcher.get_main_menu_path(details.desktop_file)
     self.assertNotEqual(found, None)
Exemplo n.º 4
0
 def disabled_for_now_test_where_is_it_in_system(self):
     app = Application("Hardware Drivers", "jockey-gtk")
     details = app.get_details(self.db)
     self.assertEqual(details.desktop_file,
                      "/usr/share/app-install/desktop/jockey-gtk.desktop")
     # search the settings menu
     searcher = GMenuSearcher()
     found = searcher.get_main_menu_path(details.desktop_file)
     self.assertEqual(found[0].get_name(), "Desktop")
     self.assertEqual(found[0].get_icon(), "preferences-other")
     self.assertEqual(found[1].get_name(), "Administration")
     self.assertEqual(found[1].get_icon(), "preferences-system")
Exemplo n.º 5
0
 def test_where_is_it_real_system(self):
     app = Application("", "gedit")
     details = app.get_details(self.db)
     if details.pkg_state != PkgStates.INSTALLED:
         logging.warn("gedit not installed, skipping real menu test")
         self.skipTest("gedit not installed")
         return
     self.assertEqual(details.desktop_file,
                      "/usr/share/app-install/desktop/gedit:gedit.desktop")
     # search the *real* menu
     searcher = GMenuSearcher()
     found = searcher.get_main_menu_path(details.desktop_file)
     self.assertNotEqual(found, None)
Exemplo n.º 6
0
 def test_where_is_it_kde4(self):
     app = Application("", "ark")
     details = app.get_details(self.db)
     self.assertEqual(details.desktop_file,
                      "/usr/share/app-install/desktop/ark:kde4__ark.desktop")
     # search the settings menu
     searcher = GMenuSearcher()
     found = searcher.get_main_menu_path(
         details.desktop_file,
         [os.path.join(DATA_DIR, "fake-applications.menu")])
     self.assertEqual(found[0].get_name(), "Applications")
     self.assertEqual(found[0].get_icon().get_names()[0],
                      "applications-other")
     self.assertEqual(found[1].get_name(), "Accessories")
     self.assertEqual(found[1].get_icon().get_names()[0],
                      "applications-utilities")
Exemplo n.º 7
0
 def test_where_is_it_in_applications(self):
     app = Application("Calculator", "gcalctool")
     details = app.get_details(self.db)
     self.assertEqual(details.desktop_file,
                      "/usr/share/app-install/desktop/gcalctool:gcalctool.desktop")
     # search the settings menu
     searcher = GMenuSearcher()
     found = searcher.get_main_menu_path(
         details.desktop_file,
         [os.path.join(DATA_DIR, "fake-applications.menu")])
     self.assertEqual(found[0].get_name(), "Applications")
     self.assertEqual(found[0].get_icon().get_names()[0],
                      "applications-other")
     self.assertEqual(found[1].get_name(), "Accessories")
     self.assertEqual(found[1].get_icon().get_names()[0],
                      "applications-utilities")
 def test_where_is_it_in_applications(self):
     app = Application("Calculator", "gcalctool")
     details = app.get_details(self.db)
     self.assertEqual(
         details.desktop_file,
         "/usr/share/app-install/desktop/gcalctool:gcalctool.desktop")
     # search the settings menu
     searcher = GMenuSearcher()
     found = searcher.get_main_menu_path(
         details.desktop_file,
         [os.path.abspath("./data/fake-applications.menu")])
     self.assertEqual(found[0].get_name(), "Applications")
     self.assertEqual(found[0].get_icon().get_names()[0],
                      "applications-other")
     self.assertEqual(found[1].get_name(), "Accessories")
     self.assertEqual(found[1].get_icon().get_names()[0],
                      "applications-utilities")