Example #1
0
 def test_update_file_item_non_existing_file(self):
     idea = Idea(ItemType('idea', ''), 'idea-77', 'idea-77')
     idea.relations.add_invented_by('stakeholder-1')
     idea.relations.add_invented_by('stakeholder-2')
     assert self.fileHandler.update_file(idea)
     idea.set_filename(self.project_sodocu_path + '/idea/Idea-66.txt')
     idea.set_name('idea-55')
     assert not self.fileHandler.update_file(idea)
Example #2
0
    def test_write_file_failure(self):
        idea = Idea(ItemType('idea', ''), 'idea-66', 'idea-66')
        idea.set_filename('/no/directory/idea/Idea-66.txt')
#         with self.assertRaises(IOError):
        assert not self.fileHandler.write_file(idea)