def test_multiple_posts(self):
        settings.MESSAGE_LEVEL = constants.DEBUG
        data = {
            'messages': ['Test message %d' % x for x in xrange(10)],
        }
        show_url = reverse('django.contrib.messages.tests.urls.show')
        messages = []
        for level in ('debug', 'info', 'success', 'warning', 'error'):
            messages.extend([Message(self.levels[level], msg) for msg in
                                                             data['messages']])
            add_url = reverse('django.contrib.messages.tests.urls.add',
                              args=(level,))
            self.client.post(add_url, data)
        response = self.client.get(show_url)
        self.assertTrue('messages' in response.context)
        self.assertEqual(list(response.context['messages']), messages)
        for msg in data['messages']:
            self.assertContains(response, msg)
Return a formula representation of a STR instruction.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/contrib/messages/tests/base.py/BaseTest.test_multiple_posts--crossover with--dataset/ETHPy150Open programa-stic/barf-project/barf/barf/core/smt/smttranslator.py/SmtTranslator._translate_str