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 == {}
def setUp(self): FakeFs.erase() FakeFs.File("/etc/default/ovirt").touch()
def tearDown(self): FakeFs.erase()
def setUp(self): FakeFs.erase() FakeFs.File("/etc/default/ovirt").touch() FakeFs.File("/etc/system-release-cpe").write("cpe:/o:fedoraproject:fedora:19")
def setUp(self): FakeFs.erase()
def setUp(self): FakeFs.erase() FakeFs.File("/etc/default/ovirt").touch() FakeFs.File("/etc/system-release-cpe")\ .write("cpe:/o:fedoraproject:fedora:19")
def setUp(self): FakeFs.erase() self.defaults_file.touch() logging.basicConfig()