Beispiel #1
0
    def test_not_supported_message_for_put_post_and_delete(self):
        resp = self.put(self.EXTRA_API_URL, data={})
        assert_http_method_not_allowed(resp)

        resp = self.post(self.EXTRA_API_URL, data={})
        assert_http_method_not_allowed(resp)

        resp = self.delete(self.EXTRA_API_URL)
        assert_http_method_not_allowed(resp)
    def test_not_allowed_requests(self, number, data):
        resp = self.post(self.USER_API_URL, data=data)
        assert_valid_JSON_created_response(resp)
        pk = self.get_pk(resp)

        resp = self.post('%s%s/' % (self.USER_API_URL, pk), data=data)
        assert_http_method_not_allowed(resp)

        resp = self.delete(self.USER_API_URL)
        assert_http_method_not_allowed(resp)

        resp = self.put(self.USER_API_URL, data=data)
        assert_http_method_not_allowed(resp)
 def test_issue_post_should_not_be_supported_because_can_create_is_disabled(
         self):
     assert_http_method_not_allowed(self.post(self.ISSUE_API_URL, data={}))
 def test_issue_delete_should_not_be_supported_because_can_delete_is_disabled(
         self):
     assert_http_method_not_allowed(self.delete(self.ISSUE_API_URL + '1/'))