예제 #1
0
    def test_basic(self):
        FakeFs.erase()
        with patch("ovirt.node.utils.fs.File", FakeFs.File):
            f = fs.File("new-file")
            f.touch()
            assert "new-file" in FakeFs.filemap

            f.delete()
            print FakeFs.filemap
            assert FakeFs.filemap == {}
예제 #2
0
    def test_basic(self):
        FakeFs.erase()
        with patch("ovirt.node.utils.fs.File", FakeFs.File):
            f = fs.File("new-file")
            f.touch()
            assert "new-file" in FakeFs.filemap

            f.delete()
            print FakeFs.filemap
            assert FakeFs.filemap == {}
예제 #3
0
 def setUp(self):
     FakeFs.erase()
     FakeFs.File("/etc/default/ovirt").touch()
예제 #4
0
 def tearDown(self):
     FakeFs.erase()
예제 #5
0
 def setUp(self):
     FakeFs.erase()
     FakeFs.File("/etc/default/ovirt").touch()
     FakeFs.File("/etc/system-release-cpe").write("cpe:/o:fedoraproject:fedora:19")
예제 #6
0
 def setUp(self):
     FakeFs.erase()
예제 #7
0
 def setUp(self):
     FakeFs.erase()
     FakeFs.File("/etc/default/ovirt").touch()
예제 #8
0
 def tearDown(self):
     FakeFs.erase()
예제 #9
0
 def setUp(self):
     FakeFs.erase()
     FakeFs.File("/etc/default/ovirt").touch()
     FakeFs.File("/etc/system-release-cpe")\
         .write("cpe:/o:fedoraproject:fedora:19")
예제 #10
0
 def setUp(self):
     FakeFs.erase()
예제 #11
0
 def setUp(self):
     FakeFs.erase()
     self.defaults_file.touch()
     logging.basicConfig()
예제 #12
0
 def setUp(self):
     FakeFs.erase()
     self.defaults_file.touch()
     logging.basicConfig()