File: comment.py

package info (click to toggle)
python-lamson 1.0pre11-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 3,508 kB
  • ctags: 1,036
  • sloc: python: 5,772; xml: 177; makefile: 19
file content (12 lines) | stat: -rw-r--r-- 374 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from nose.tools import *
from lamson import mail
from app.model import comment

def test_attach_headers():
    msg = mail.MailRequest('test_attach_headers', 'tester@localhost', 'test.blog@oneshotblog.com',
                           'Fake body.')

    comment.attach_headers(msg)
    for key in ['X-Post-Name', 'X-Post-User-ID', 'X-Post-Domain']:
        assert key in msg