Fix tests
Test files from tests/var weren't included in the new repo so the tests would fail with an exception due to missing files. To fix this the files are copied from oslo-incubator. Also, Python 3 requires absolute imports so this was fixed in oslo_policy.policy. The imports were out of order so the pep8 tests failed. Change-Id: I1ee6c2aed9565e5472306bc715ac42b74de6c39f
This commit is contained in:
parent
7c9db3c70a
commit
14c680b807
|
@ -11,7 +11,6 @@ build
|
|||
eggs
|
||||
parts
|
||||
bin
|
||||
var
|
||||
sdist
|
||||
develop-eggs
|
||||
.installed.cfg
|
||||
|
|
|
@ -96,14 +96,13 @@ import re
|
|||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_policy.openstack.common import fileutils
|
||||
from oslo_policy.openstack.common._i18n import _, _LE, _LI
|
||||
from oslo_policy.openstack.common import log as logging
|
||||
import six
|
||||
import six.moves.urllib.parse as urlparse
|
||||
import six.moves.urllib.request as urlrequest
|
||||
|
||||
from openstack.common import fileutils
|
||||
from openstack.common._i18n import _, _LE, _LI
|
||||
from openstack.common import log as logging
|
||||
|
||||
|
||||
policy_opts = [
|
||||
cfg.StrOpt('policy_file',
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
import os
|
||||
|
||||
import mock
|
||||
from oslo_policy import policy
|
||||
from oslo.config import cfg
|
||||
from oslo.config import fixture as config
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_policy import policy
|
||||
from oslotest import base as test_base
|
||||
import six
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"default": "role:fakeC"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"default": "role:fakeA"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"default": "role:fakeB"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
fake
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"default": "rule:admin",
|
||||
"admin": "is_admin:True"
|
||||
}
|
Loading…
Reference in New Issue