~brian-murray/unattended-upgrades/bug-fixes

« back to all changes in this revision

Viewing changes to test/test_conffile.py

  • Committer: Michael Vogt
  • Date: 2013-04-12 17:34:38 UTC
  • Revision ID: michael.vogt@ubuntu.com-20130412173438-wj0eiy1etgvjql3v
test fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
    def test_xz_compression(self):
60
60
        test_pkg = "./packages/conf-test-xz_1.0_all.deb"
61
 
        self.assertFalse(conffile_prompt(test_pkg, prefix="./root.conffile"),
62
 
                        "conffile prompt detection incorrect")
63
 
 
64
 
 
65
 
class DpkgConffileTestCase(unittest.TestCase):
66
 
    """
67
 
    This tests that the detection if dpkg will prompt at all works,
68
 
    i.e. if the user has decided to use a --force-conf{old,new} option
69
 
    """
70
 
 
71
 
    def setUp(self):
72
 
        apt_pkg.config.clear("DPkg::Options")
73
 
 
74
 
    def test_no_dpkg_prompt_option(self):
75
 
        self.assertTrue(dpkg_conffile_prompt())
76
 
 
77
 
    def test_regression_lp1061498(self):
78
 
        apt_pkg.config.set("DPkg::Options::", "muup")
79
 
        self.assertTrue(dpkg_conffile_prompt())
80
 
 
81
 
    def test_dpkg_will_never_prompt(self):
82
 
        apt_pkg.config.set("DPkg::Options::", "--force-confold")
83
 
        self.assertFalse(dpkg_conffile_prompt())
 
61
        self.assertFalse(
 
62
            conffile_prompt(test_pkg, prefix="./root.conffile"),
 
63
            "conffile prompt detection incorrect")
84
64
 
85
65
 
86
66
class DpkgConffileTestCase(unittest.TestCase):