diff options
author | Ales Kozumplik <akozumpl@redhat.com> | 2011-08-23 15:20:39 +0200 |
---|---|---|
committer | Ales Kozumplik <akozumpl@redhat.com> | 2011-08-24 10:11:04 +0200 |
commit | a1d6e3c3f3a49814b80e85b8026bc9a50d7cb022 (patch) | |
tree | 0eaaf6066685e74c5554e6d33aab5694c038ed20 /tests/pyanaconda_test | |
parent | addef32b5b2dfdd595a690c97abfe8116870f6b1 (diff) | |
download | anaconda-a1d6e3c3f3a49814b80e85b8026bc9a50d7cb022.tar.gz anaconda-a1d6e3c3f3a49814b80e85b8026bc9a50d7cb022.tar.xz anaconda-a1d6e3c3f3a49814b80e85b8026bc9a50d7cb022.zip |
ut: cleanup after firewall_test.py
Diffstat (limited to 'tests/pyanaconda_test')
-rw-r--r-- | tests/pyanaconda_test/firewall_test.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/pyanaconda_test/firewall_test.py b/tests/pyanaconda_test/firewall_test.py index a2d141159..52ea436ff 100644 --- a/tests/pyanaconda_test/firewall_test.py +++ b/tests/pyanaconda_test/firewall_test.py @@ -1,16 +1,16 @@ import mock -class ImportTest(mock.TestCase): +class FirewallTest(mock.TestCase): def setUp(self): self.setupModules(["_isys", "block", "ConfigParser"]) - + self.fs = mock.DiskIO() - + import pyanaconda.firewall self.modifiedModule("pyanaconda.firewall") self.modifiedModule("os.path") - + pyanaconda.firewall.open = self.fs.open pyanaconda.firewall.log = mock.Mock() pyanaconda.firewall.iutil = mock.Mock() @@ -18,6 +18,9 @@ class ImportTest(mock.TestCase): pyanaconda.firewall.os.path = mock.Mock() pyanaconda.firewall.os.path.exists = self.fs.os_path_exists + def tearDown(self): + self.tearDownModules() + def default_write_test(self): import pyanaconda.firewall fw = pyanaconda.firewall.Firewall() @@ -39,11 +42,10 @@ class ImportTest(mock.TestCase): def default_ks_test(self): """Simulate writing default fw to kickstart""" - + import pyanaconda.firewall fw = pyanaconda.firewall.Firewall() f = self.fs.open("/tmp/fw.txt", "w") fw.writeKS(f) f.close() self.assertEquals(self.fs["/tmp/fw.txt"], "firewall --service=ssh\n") - |