def test_post_form_with_readonly_resource_failing_auth(self):
        read_only_access_token = self.token
        read_only_access_token.scope.is_readonly = True
        read_only_access_token.scope.save()
        params = self._create_authorization_url_parameters()
        response = self.csrf_client.post('/oauth-with-scope/', params)
        self.assertIn(response.status_code, (status.HTTP_401_UNAUTHORIZED, status.HTTP_403_FORBIDDEN))
Ensure POSTing with a readonly resource instead of a write scope fails
dataset/ETHPy150Open jlafon/django-rest-framework-oauth/tests/test_oauth.py/OAuthTests.test_post_form_with_readonly_resource_failing_auth