'Tests that we can create an approval object to run hunts.'

def testHuntApproval(self):

    hunt_urn = self.CreateSampleHunt()
    self.assertRaises(grr_api_errors.AccessForbiddenError, self.api.Hunt(hunt_urn.Basename()).Start)
    self.CreateHuntApproval(hunt_urn, self.token, admin=False)
    self.assertRaisesRegexp(grr_api_errors.AccessForbiddenError, "At    least    1    approver\\(s\\)    should    have    'admin'    label.", self.api.Hunt(hunt_urn.Basename()).Start)
    self.CreateHuntApproval(hunt_urn, self.token, admin=True)
    self.api.Hunt(hunt_urn.Basename()).Start()
