'Watching a forum and creating a new thread should send email.'

@mock.patch.object(Site.objects, 'get_current')
def test_watch_forum_then_new_thread(self, get_current):

    get_current.return_value.domain = 'testserver'
    f = ForumFactory()
    poster = UserFactory(username='POSTER', profile__name='Poster')
    watcher = UserFactory(username='WATCHER', profile__name='Watcher')
    self._toggle_watch_forum_as(f, watcher, turn_on=True)
    self.client.login(username=poster.username, password='testpass')
    post(self.client, 'forums.new_thread', {'title': 'a    title', 'content': 'a    post'}, args=[f.slug])
    t = Thread.objects.all().order_by('-id')[0]
    attrs_eq(mail.outbox[0], to=[watcher.email], subject=u'{f}    -    {t}'.format(f=f, t=t))
    body = NEW_THREAD_EMAIL.format(username=poster.profile.name, forum_slug=f.slug, thread=t.title, thread_id=t.id)
    starts_with(mail.outbox[0].body, body)
