~mvo/software-center/new-pep8

« back to all changes in this revision

Viewing changes to tests/test_apthistory.py

  • Committer: Michael Vogt
  • Date: 2012-06-20 14:28:05 UTC
  • mfrom: (3030.1.2 py-apt-0.8)
  • Revision ID: michael.vogt@ubuntu.com-20120620142805-on6ddf582uoovd6r
merged lp:~mvo/software-center/python-apt-0.8 after approval from nessita

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
    def setUp(self):
23
23
        self.basedir = os.path.join(DATA_DIR, "apt-history")
24
 
        apt.apt_pkg.Config.set("Dir::Log", self.basedir)
25
 
        #apt_pkg.Config.set("Dir::Log::History", "./")
 
24
        apt.apt_pkg.config.set("Dir::Log", self.basedir)
 
25
        #apt_pkg.config.set("Dir::Log::History", "./")
26
26
 
27
27
    def _get_apt_history(self):
28
28
        history = AptHistory(use_cache=False)
84
84
 
85
85
    def test_no_history_log(self):
86
86
        # set to dir with no existing history.log
87
 
        apt.apt_pkg.Config.set("Dir::Log", "/")
 
87
        apt.apt_pkg.config.set("Dir::Log", "/")
88
88
        # this should not raise
89
89
        history = self._get_apt_history()
90
90
        self.assertEqual(history.transactions, [])
91
 
        apt.apt_pkg.Config.set("Dir::Log", self.basedir)
 
91
        apt.apt_pkg.config.set("Dir::Log", self.basedir)
92
92
 
93
93
if __name__ == "__main__":
94
94
    unittest.main()