예제 #1
0
 def setUp(self):
     super(FailoverSegmentTestCasePolicyNotAuthorized, self).setUp()
     self.controller = segments.SegmentsController()
     self.req = fakes.HTTPRequest.blank('/v1/segments')
     self.context = self.req.environ['masakari.context']
     self.rule_name = "os_masakari_api:segments"
     self.policy.set_rules({self.rule_name: "project:non_fake"})
예제 #2
0
 def setUp(self):
     super(FailoverSegmentTestCase, self).setUp()
     self.controller = segments.SegmentsController()
     self.req = fakes.HTTPRequest.blank('/v1/segments',
                                        use_admin_context=True)
     self.context = self.req.environ['masakari.context']
예제 #3
0
 def setUp(self):
     super(FailoverSegmentTestCasePolicyNotAuthorized, self).setUp()
     self.controller = segments.SegmentsController()
     self.req = fakes.HTTPRequest.blank('/v1/segments')
     self.context = self.req.environ['masakari.context']