summaryrefslogtreecommitdiff
path: root/tests/template_tests/test_loaders.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-01-19 00:58:22 -0600
committerAlex Gaynor <alex.gaynor@gmail.com>2014-01-19 00:58:22 -0600
commit9d487ae2a16d1efd501e65c78e6885c8cdcd4421 (patch)
tree76f6b9797e7ff5a736a9c4d6d23f1a61d4074bd5 /tests/template_tests/test_loaders.py
parent10e0cfc0e4e77b85e8261c908baf1c4814ded3f8 (diff)
Refs #21628 -- removed one usage of the imp module in the tests. It is deprecated in Python 3.4
Diffstat (limited to 'tests/template_tests/test_loaders.py')
-rw-r--r--tests/template_tests/test_loaders.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/template_tests/test_loaders.py b/tests/template_tests/test_loaders.py
index 42330b8782..6c16b9bbbe 100644
--- a/tests/template_tests/test_loaders.py
+++ b/tests/template_tests/test_loaders.py
@@ -9,9 +9,9 @@ from django.conf import settings
if __name__ == '__main__':
settings.configure()
-import imp
import os.path
import sys
+import types
import unittest
try:
@@ -41,7 +41,7 @@ def create_egg(name, resources):
name: The name of the module.
resources: A dictionary of resources. Keys are the names and values the data.
"""
- egg = imp.new_module(name)
+ egg = types.ModuleType(name)
egg.__loader__ = MockLoader()
egg._resources = resources
sys.modules[name] = egg