diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-01-28 07:01:35 -0800 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-01-28 11:15:06 -0500 |
| commit | 7785e03ba89aafbd949191f126361fb9103cb980 (patch) | |
| tree | 5776f7063604285445cfcebf6efb42fd5d063f60 /tests/template_tests | |
| parent | 7444f3252757ed4384623e5afd7dcfeef3e0c74e (diff) | |
Fixed #30137 -- Replaced OSError aliases with the canonical OSError.
Used more specific errors (e.g. FileExistsError) as appropriate.
Diffstat (limited to 'tests/template_tests')
| -rw-r--r-- | tests/template_tests/test_loaders.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/template_tests/test_loaders.py b/tests/template_tests/test_loaders.py index ea69472264..9023457751 100644 --- a/tests/template_tests/test_loaders.py +++ b/tests/template_tests/test_loaders.py @@ -191,11 +191,11 @@ class FileSystemLoaderTests(SimpleTestCase): tmppath = os.path.join(tmpdir, tmpfile.name) os.chmod(tmppath, 0o0222) with self.set_dirs([tmpdir]): - with self.assertRaisesMessage(IOError, 'Permission denied'): + with self.assertRaisesMessage(PermissionError, 'Permission denied'): self.engine.get_template(tmpfile.name) def test_notafile_error(self): - with self.assertRaises(IOError): + with self.assertRaises(IsADirectoryError): self.engine.get_template('first') |
