'Ensure that regular users can\'t create or delete flavors.'

def test_flavor_manage_permissions(self):

    ctx = context.get_admin_context()
    flav1 = {'flavor': rand_flavor()}
    resp = self.user_api.api_post('flavors', flav1, check_response_status=False)
    self.assertEqual(403, resp.status)
    self.assertRaises(ex.FlavorNotFound, objects.Flavor.get_by_flavor_id, ctx, flav1['flavor']['id'])
    self.api.api_post('flavors', flav1)
    resp = self.user_api.api_delete(('flavors/%s' % flav1['flavor']['id']), check_response_status=False)
    self.assertEqual(403, resp.status)
    objects.Flavor.get_by_flavor_id(ctx, flav1['flavor']['id'])
