Skip to content

Commit

Permalink
[FIX] restore tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cvinh committed Oct 29, 2022
1 parent 772cac2 commit 0d84ba3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions mail_body_notified_partner/tests/test_mail_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,42 @@


class TestMailNotification(common.TransactionCase):
def setUp(self):
super().setUp()
self.sender = self.env['res.partner'].create({
'name': 'Test sender',
'email': 'sender@example.com',
})
self.recipient = self.env['res.partner'].create({
'name': 'Test recipient',
'email': 'recipient@example.com',
})
self.message = self.env['mail.message'].create({
'subject': 'Message test',
'author_id': self.sender.id,
'email_from': self.sender.email,
'message_type': 'comment',
'model': 'res.partner',
'res_id': self.recipient.id,
'partner_ids': [(4, self.recipient.id)],
'body': '<p>This is a test message</p>',
})

self.record = self.recipient

self.rdata = [{
'type': 'customer',
'id': self.recipient.id,
'groups': [None],
'active': True,
'share': True,
'notif': 'email'
}]
self.force_send = True
self.send_after_commit = True
self.model_description = False
self.mail_auto_delete = True

def test_get_signature_footer(self):
rep = self.recipient._notify(
self.message,
Expand Down

0 comments on commit 0d84ba3

Please sign in to comment.