Beispiel #1
0
 def test_region_controller_actions_for_admin(self):
     handler = GeneralHandler(factory.make_admin(), {}, None)
     self.assertItemsEqual(
         ["set-zone", "delete"],
         [
             action["name"]
             for action in handler.region_controller_actions({})
         ],
     )
Beispiel #2
0
 def test_region_controller_actions_for_non_admin(self):
     handler = GeneralHandler(factory.make_User(), {})
     self.assertEqual([], handler.region_controller_actions({}))
Beispiel #3
0
 def test_region_controller_actions_for_admin(self):
     handler = GeneralHandler(factory.make_admin(), {})
     self.assertItemsEqual(['set-zone', 'delete'], [
         action['name'] for action in handler.region_controller_actions({})
     ])