diff options
| author | Florian Apolloner <florian@apolloner.eu> | 2014-05-25 23:14:50 +0200 |
|---|---|---|
| committer | Florian Apolloner <florian@apolloner.eu> | 2014-05-25 23:14:50 +0200 |
| commit | 536ebaa048f69c18aa36448074f65f2741e35df5 (patch) | |
| tree | 6e0bdec14d159b416a3007e9624539515af740fb | |
| parent | 417ec4a68b0460bd563801549ca90de64e55face (diff) | |
Fixed a few warnings in the testsuite.
| -rw-r--r-- | tests/forms_tests/tests/test_forms.py | 2 | ||||
| -rw-r--r-- | tests/view_tests/tests/test_static.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py index 3aa73fd33e..f1976e680d 100644 --- a/tests/forms_tests/tests/test_forms.py +++ b/tests/forms_tests/tests/test_forms.py @@ -60,7 +60,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.') diff --git a/tests/view_tests/tests/test_static.py b/tests/view_tests/tests/test_static.py index fc9a1edb08..aa5315f05b 100644 --- a/tests/view_tests/tests/test_static.py +++ b/tests/view_tests/tests/test_static.py @@ -35,6 +35,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' |
