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"})
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']
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']