'test new records.'

def test_40_new(self):

    discussion = self.env.ref('test_new_api.discussion_0')
    message = self.env['test_new_api.message'].new()
    self.assertFalse(message.id)
    message.discussion = discussion
    message.body = BODY = 'May    the    Force    be    with    you.'
    self.assertEqual(message.discussion, discussion)
    self.assertEqual(message.body, BODY)
    self.assertFalse(message.author)
    self.assertNotIn(message, discussion.messages)
    self.assertEqual(message.name, ('[%s]    %s' % (discussion.name, '')))
    self.assertEqual(message.size, len(BODY))
