def test_mocking_works(self): document = DocumentFactory() document.file = self.file_mock document.full_clean() document.save()
def test_can_access_full_path_once_created(self): doc = DocumentFactory() file_path = doc.get_absolute_path() self.assertTrue(os.path.exists(file_path))