~er-abhinav-upadhyay/computer-janitor/bug-726616

« back to all changes in this revision

Viewing changes to computerjanitorapp/app_tests.py

  • Committer: Bazaar Package Importer
  • Author(s): Lars Wirzenius
  • Date: 2009-08-21 15:48:12 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090821154812-s89fcyo4co74tk7o
Tags: 1.13.2-0ubuntu1
* New upstream version. Closes bugs in Launchpad:
  - System cleaner removes explicitly installed third-party packages
    (LP: #285746)
  - I do not want to remove '/' (LP: #337241)
  - computer-janitor incomplete error description (LP: #365325)
  - computer-janitor commandline interface not pipe-friendly (LP: #375094)
  - Python 2.6 DeprecationWarning: Accessed deprecated property 
    Package.candidateDownloadable (LP: #407127)
  - Should use GtkBuilder rather than libglade (LP: #403537)
  - Ambiguous wording in confirmation alert box (LP: #349336)
  - computer-janitor-gtk crashed with UnicodeDecodeError in 
    get_description() (LP: #352461)
  - Can't deselect fixes with space in computer-janitor (LP: #355535)
  - relatime tweak will not be necessary in karmic (LP: #369151)
  - computer janitor needs filesize column (LP: #396522)
* Packaging now uses dh from debhelper 7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
class MockPackage(object):
36
36
 
37
37
    def __init__(self, downloadable=False):
38
 
        self.candidateDownloadable = downloadable
 
38
        self.downloadable = downloadable
 
39
        self.candidate = self
39
40
 
40
41
 
41
42
class MockApt(dict):
123
124
                          self.app.verify_apt_cache)
124
125
 
125
126
    def testRejectsAptCacheWhenDashIsNotDownloadable(self):
126
 
        self.app.apt_cache["dash"].candidateDownloadable = False
 
127
        self.app.apt_cache["dash"].candidate.downloadable = False
127
128
        self.assertRaises(computerjanitor.Exception, 
128
129
                          self.app.verify_apt_cache)
129
130
 
130
131
    def testRejectsAptCacheWhenGzipIsNotDownloadable(self):
131
 
        self.app.apt_cache["gzip"].candidateDownloadable = False
 
132
        self.app.apt_cache["dash"].candidate.downloadable = False
132
133
        self.assertRaises(computerjanitor.Exception, 
133
134
                          self.app.verify_apt_cache)
134
135