def test_save_and_load(self): self.document.load(TEST_PROFILE) self.document.share_file((REPO+"/data/subdir1/TOtO.txt", True)) self.document.save("data/profiles/tata") new_doc = FileDocument() new_doc.load("data/profiles/tata") container = new_doc.get_container(REPO+u"/data/subdir1") self.assert_(dict.has_key(container, "TOtO.txt"))
def test_save_and_load(self): self.document.load() self.document.share_file((REPO+"/data/subdir1/TOtO.txt", True)) sav_doc = FileDocument(PROFILE_TATA, PROFILE_DIRECTORY) sav_doc.import_document(self.document) sav_doc.save() new_doc = FileDocument(PROFILE_TATA, PROFILE_DIRECTORY) new_doc.load() container = new_doc.get_container(REPO+u"/data/subdir1") self.assert_(dict.has_key(container, "TOtO.txt"))