mirror of
https://github.com/django/django.git
synced 2025-03-12 10:22:37 +00:00
Fixed a few warnings in the testsuite.
This commit is contained in:
parent
417ec4a68b
commit
536ebaa048
@ -60,7 +60,7 @@ class FormsTestCase(TestCase):
|
|||||||
self.assertHTMLEqual(str(p['birthday']), '<input type="text" name="birthday" value="1940-10-9" id="id_birthday" />')
|
self.assertHTMLEqual(str(p['birthday']), '<input type="text" name="birthday" value="1940-10-9" id="id_birthday" />')
|
||||||
|
|
||||||
nonexistenterror = "Key u?'nonexistentfield' not found in 'Person'"
|
nonexistenterror = "Key u?'nonexistentfield' not found in 'Person'"
|
||||||
with self.assertRaisesRegexp(KeyError, nonexistenterror):
|
with self.assertRaisesRegex(KeyError, nonexistenterror):
|
||||||
p['nonexistentfield']
|
p['nonexistentfield']
|
||||||
self.fail('Attempts to access non-existent fields should fail.')
|
self.fail('Attempts to access non-existent fields should fail.')
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ class StaticTests(SimpleTestCase):
|
|||||||
def test_unknown_mime_type(self):
|
def test_unknown_mime_type(self):
|
||||||
response = self.client.get('/%s/file.unknown' % self.prefix)
|
response = self.client.get('/%s/file.unknown' % self.prefix)
|
||||||
self.assertEqual('application/octet-stream', response['Content-Type'])
|
self.assertEqual('application/octet-stream', response['Content-Type'])
|
||||||
|
response.close()
|
||||||
|
|
||||||
def test_copes_with_empty_path_component(self):
|
def test_copes_with_empty_path_component(self):
|
||||||
file_name = 'file.txt'
|
file_name = 'file.txt'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user