mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.9.x] Fixed #25948 -- Added guidelines for SimpleTestCase.assertRaisesMessage() usage.
Backport of 77f50c9cfc from master
			
			
This commit is contained in:
		| @@ -45,6 +45,12 @@ Python style | ||||
|           """ | ||||
|           ... | ||||
|  | ||||
| * In tests, use :meth:`~django.test.SimpleTestCase.assertRaisesMessage` instead | ||||
|   of :meth:`~unittest.TestCase.assertRaises` so you can check the exception | ||||
|   message. Use :meth:`~unittest.TestCase.assertRaisesRegex` | ||||
|   (``six.assertRaisesRegex()`` as long as we support Python 2) only if you need | ||||
|   to use regular expression matching. | ||||
|  | ||||
| Imports | ||||
| ------- | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user