mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #23620 -- Used more specific assertions in the Django test suite.
This commit is contained in:
parent
c0c78f1b70
commit
f7969b0920
83 changed files with 419 additions and 429 deletions
|
@ -955,7 +955,7 @@ class ContextTests(TestCase):
|
|||
"Context variables can be retrieved from a single context"
|
||||
response = self.client.get("/request_data/", data={'foo': 'whiz'})
|
||||
self.assertEqual(response.context.__class__, Context)
|
||||
self.assertTrue('get-foo' in response.context)
|
||||
self.assertIn('get-foo', response.context)
|
||||
self.assertEqual(response.context['get-foo'], 'whiz')
|
||||
self.assertEqual(response.context['request-foo'], 'whiz')
|
||||
self.assertEqual(response.context['data'], 'sausage')
|
||||
|
@ -971,7 +971,7 @@ class ContextTests(TestCase):
|
|||
response = self.client.get("/request_data_extended/", data={'foo': 'whiz'})
|
||||
self.assertEqual(response.context.__class__, ContextList)
|
||||
self.assertEqual(len(response.context), 2)
|
||||
self.assertTrue('get-foo' in response.context)
|
||||
self.assertIn('get-foo', response.context)
|
||||
self.assertEqual(response.context['get-foo'], 'whiz')
|
||||
self.assertEqual(response.context['request-foo'], 'whiz')
|
||||
self.assertEqual(response.context['data'], 'bacon')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue