py3: replace reload with six.moves.reload_module

Get the reload() function from six.moves.reload_module().
There have one more place should be modified.

Change-Id: I129df5935524f56b15525e17170cb74a5616201e
Partial-Implements: blueprint porting-python3
This commit is contained in:
LiuNanke 2016-01-02 04:24:54 +08:00
parent 000ab2ddad
commit 014555d494

View File

@ -17,6 +17,7 @@ from django.conf import settings
from django.core import urlresolvers
from django.core.urlresolvers import reverse
from django.utils.importlib import import_module # noqa
from six import moves
from horizon import base
@ -30,7 +31,7 @@ class ThemePreviewTests(test.TestCase):
def setUp(self):
super(ThemePreviewTests, self).setUp()
urlresolvers.clear_url_caches()
reload(import_module(settings.ROOT_URLCONF))
moves.reload_module(import_module(settings.ROOT_URLCONF))
base.Horizon.register(Developer)
base.Horizon._urls()