Fixed #12368: Fixed order-dependent messages test that was failing on MySQL/MyISAM. Thanks Tobias.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Karen Tracey 2009-12-13 17:20:36 +00:00
parent 4b0f9531eb
commit cafb12464b
1 changed files with 2 additions and 2 deletions

View File

@ -218,9 +218,9 @@ class BaseTest(TestCase):
response = self.client.post(add_url, data, follow=True)
self.assertRedirects(response, show_url)
self.assertTrue('messages' in response.context)
self.assertEqual(list(response.context['messages']),
data['messages'])
context_messages = list(response.context['messages'])
for msg in data['messages']:
self.assertTrue(msg in context_messages)
self.assertContains(response, msg)
def test_middleware_disabled_anon_user(self):