Hello,
I have one test suite (among many others) in my application that
succeeds in isolation, but fails
when I run the whole battery. Could anyone suggest where to start
looking? Thanks.
Posting the code below. The test is counting number of emails sent as
a result of posting a question
at the forum. The emails are send by a Celery task (with
CELERY_ALWAYS_EAGER = True).
class
TagFollowedInstantWholeForumEmailAlertTests(utils.AskbotTestCase):
def setUp(self):
self.create_user(
username = 'user1',
notification_schedule = {'q_all': 'i'},
status = 'm'
)
self.create_user(
username = 'user2',
status = 'm'
)
def test_wildcard_catches_new_tag(self):
"""users asks a question with a brand new tag
and other user subscribes to it by wildcard
"""
askbot_settings.update('USE_WILDCARD_TAGS', True)
self.user1.email_tag_filter_strategy =
const.INCLUDE_INTERESTING
self.user1.save()
self.user1.mark_tags(
wildcards = ('some*',),
reason = 'good',
action = 'add'
)
self.user2.post_question(
title = 'some title',
body_text = 'some text for the question',
tags = 'something'
)
outbox = django.core.mail.outbox
self.assertEqual(len(outbox), 1)
self.assertEqual(len(outbox[0].recipients()), 1)
self.assertTrue(
self.user1.email in outbox[0].recipients()
)
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.