Exemple #1
0
 def _set_up(self):
     self.controller = hosts.HostsController()
     self.req = fakes.HTTPRequest.blank('/v1/segments/%s/hosts' %
                                        uuidsentinel.fake_segment1)
     self.context = self.req.environ['masakari.context']
     self.rule_name = "os_masakari_api:os-hosts"
     self.policy.set_rules({self.rule_name: "project:non_fake"})
Exemple #2
0
 def _set_up(self):
     self.controller = hosts.HostsController()
     self.req = fakes.HTTPRequest.blank('/v1/segments/%s/hosts' %
                                        uuidsentinel.fake_segment1,
                                        use_admin_context=True)
     self.context = self.req.environ['masakari.context']