~gary-lasker/software-center/handle-trans-cancel-lp1027209-for-5.2

« back to all changes in this revision

Viewing changes to test/test_utils.py

  • Committer: Michael Vogt
  • Date: 2012-07-18 15:20:39 UTC
  • mfrom: (3043.4.16 5.2)
  • Revision ID: michael.vogt@ubuntu.com-20120718152039-d0ejg5nxqkrdn0xc
mergedĀ lp:~gary-lasker/software-center/unity-launcher-integration-fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
from softwarecenter.utils import (decode_xml_char_reference,
19
19
                                  release_filename_in_lists_from_deb_line,
20
20
                                  get_http_proxy_string_from_libproxy,
 
21
                                  get_file_path_from_iconname,
21
22
                                  )
22
 
from softwarecenter.testutils import do_events
 
23
from softwarecenter.testutils import (do_events,
 
24
                                      get_test_gtk3_icon_cache,
 
25
                                      )
23
26
 
24
27
 
25
28
class TestSCUtils(unittest.TestCase):
215
218
        # cleanup
216
219
        shutil.rmtree(tmp)
217
220
 
 
221
    def test_get_file_path_from_iconname(self):
 
222
        icons = get_test_gtk3_icon_cache()
 
223
        icon_path = get_file_path_from_iconname(
 
224
                icons,
 
225
                "softwarecenter")
 
226
        self.assertEqual(
 
227
                icon_path,
 
228
                "/usr/share/icons/hicolor/48x48/apps/softwarecenter.svg")
 
229
 
 
230
 
218
231
class TestExpungeCache(unittest.TestCase):
219
232
 
220
233
    def test_expunge_cache(self):