def get_from_note_id(note_id): """ Parses the string in a note and returns the proper noun phrases representing nodes. """ n, errors = note.find_by_id(note_id) s = n.prioritya + u' ' + n.priorityb + u' ' + n.priorityc + u' ' + n.priorityd + u' ' + n.prioritye res, errs = get_from_string(s) return res, errs + errors
def test_find_by_id(self): n, created = self.get_note() target, errors = note.find_by_id(n.id) self.assertEquals(n.id, target.id) self.assertEquals(n.identifier, u'http://www.google.com/') self.assertTrue(not errors)