Kaydet (Commit) 1992d55e authored tarafından Florian Apolloner's avatar Florian Apolloner

[1.7.x] Fixed a few warnings in the testsuite.

Backport of 536ebaa0 from master.
üst 0c685ab6
......@@ -59,7 +59,7 @@ class FormsTestCase(TestCase):
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'"
with self.assertRaisesRegexp(KeyError, nonexistenterror):
with self.assertRaisesRegex(KeyError, nonexistenterror):
p['nonexistentfield']
self.fail('Attempts to access non-existent fields should fail.')
......
......@@ -36,6 +36,7 @@ class StaticTests(SimpleTestCase):
def test_unknown_mime_type(self):
response = self.client.get('/%s/file.unknown' % self.prefix)
self.assertEqual('application/octet-stream', response['Content-Type'])
response.close()
def test_copes_with_empty_path_component(self):
file_name = 'file.txt'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment