def test_flavor_manage_permissions(self):
        ctx = context.get_admin_context()
        flav1 = {'flavor': rand_flavor()}

        # Ensure user can't create flavor
        resp = self.user_api.api_post('flavors', flav1,
                                      check_response_status=False)
        self.assertEqual(403, resp.status)
        # ... and that it didn't leak through
        self.assertRaises(ex.FlavorNotFound,
                        objects.Flavor.get_by_flavor_id,
                        ctx, flav1['flavor']['id'])

        # Create the flavor as the admin user
        self.api.api_post('flavors', flav1)

        # Ensure user can't delete flavors from our cloud
        resp = self.user_api.api_delete('flavors/%s' % flav1['flavor']['id'],
                                        check_response_status=False)
        self.assertEqual(403, resp.status)
        # ... and ensure that we didn't actually delete the flavor,
        # this will throw an exception if we did.
        objects.Flavor.get_by_flavor_id(ctx, flav1['flavor']['id'])
Test posting a new calendar, updating it, deleting it
dataset/ETHPy150Open openstack/nova/nova/tests/functional/wsgi/test_flavor_manage.py/FlavorManageFullstack.test_flavor_manage_permissions--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-build/python-libs/gdata/tests/gdata_tests/calendar/service_test.py/CalendarServiceUnitTest.testPostUpdateAndDeleteCalendar