Import mox in __init__.py

We can initialize the 'mox' of module mox3 in __init__.py,
then in these files that have modified, we only have
'import mox' other than 'from mox3 import mox', which can
make the code smaller and clear.

Change-Id: Ic09597a7205eed47bd3cff03d1e7bc78744e52d4
This commit is contained in:
shizhihui 2016-08-05 17:09:03 +08:00
parent 2f2549ad99
commit f5bf3e755d
7 changed files with 12 additions and 7 deletions

View File

@ -286,7 +286,7 @@ class CrudManager(BaseManager):
{}, {}]}`).
- `key`: Usually a singular noun by convention (e.g. `entity`); used to
refer to an individual member of the collection.
"""
collection_key = None
key = None
@ -446,7 +446,7 @@ class Resource(object):
This is pretty much just a bag for attributes.
"""
HUMAN_ID = False
NAME_ATTR = 'name'

View File

@ -0,0 +1,5 @@
import sys
from mox3 import mox
sys.modules['mox'] = mox

View File

@ -18,7 +18,7 @@ import socket
from keystoneauth1 import adapter
import mock
from mox3 import mox
import mox
from oslo_serialization import jsonutils
import requests
import six

View File

@ -13,7 +13,7 @@
# under the License.
import mock
from mox3 import mox
import mox
import testtools
from heatclient.common import utils

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from mox3 import mox
import mox
from six.moves.urllib import parse
import testtools

View File

@ -19,7 +19,7 @@ import uuid
import fixtures
from keystoneauth1 import fixture as keystone_fixture
import mock
from mox3 import mox
import mox
from oslo_serialization import jsonutils
from oslo_utils import encodeutils
from oslotest import mockpatch

View File

@ -15,7 +15,7 @@ import base64
import json
import tempfile
from mox3 import mox
import mox
import six
from six.moves.urllib import error
from six.moves.urllib import request