Browse Source

Merge "trivial: Reduce duplication in project network tests"

changes/53/743953/9
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
94d36862c2
1 changed files with 1 additions and 18 deletions
  1. +1
    -18
      neutron/tests/unit/conf/policies/test_network.py

+ 1
- 18
neutron/tests/unit/conf/policies/test_network.py View File

@ -729,7 +729,7 @@ class ProjectMemberTests(ProjectAdminTests):
self.context = self.project_member_ctx
class ProjectReaderTests(NetworkAPITestCase):
class ProjectReaderTests(ProjectMemberTests):
def setUp(self):
super(ProjectReaderTests, self).setUp()
@ -830,23 +830,6 @@ class ProjectReaderTests(NetworkAPITestCase):
self.context, 'create_network:provider:segmentation_id',
self.alt_target)
def test_get_network(self):
self.assertTrue(
policy.enforce(self.context, 'get_network', self.target))
self.assertRaises(
base_policy.PolicyNotAuthorized,
policy.enforce,
self.context, 'get_network', self.alt_target)
def test_get_network_external(self):
self.assertTrue(
policy.enforce(self.context,
'get_network:router:external', self.target))
self.assertRaises(
base_policy.PolicyNotAuthorized,
policy.enforce,
self.context, 'get_network:router:external', self.alt_target)
def test_get_network_segments(self):
self.assertRaises(
base_policy.PolicyNotAuthorized,


Loading…
Cancel
Save