Opened 5 years ago

Closed 4 years ago

#17797 closed New feature (fixed)

Added PATCH request functionality to django.test.client.Client

Reported by: pfarmer Owned by: nobody
Component: Testing framework Version: master
Severity: Normal Keywords: Test
Cc: mmitar@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Whilst developing with tastypie I found I couldn't write unittests which make PATCH requests to my resources, so quickly scanning through I saw how easy it was to make a Client.patch function and have attached a patch which should apply cleanly to the current trunk (rev 17602).

Attachments (3)

django-test-client-PATCH.patch (1.5 KB) - added by pfarmer 5 years ago.
django-test-client-PATCH.patch
django-test-client-PATCH-docs.patch (1.0 KB) - added by pfarmer 5 years ago.
Patch for docs/topics/testing.txt to include Client.patch documentation.
django-test-client-PATCH-tests.patch (1.5 KB) - added by pfarmer 5 years ago.
Basic testing for client.patch.

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by pfarmer

django-test-client-PATCH.patch

comment:1 Changed 5 years ago by Ramiro Morales

Needs documentation: set
Needs tests: set
Triage Stage: UnreviewedAccepted

Changed 5 years ago by pfarmer

Patch for docs/topics/testing.txt to include Client.patch documentation.

Changed 5 years ago by pfarmer

Basic testing for client.patch.

comment:2 Changed 5 years ago by pfarmer

Needs documentation: unset
Needs tests: unset

I've added patches for documentation and some basic testing, testing may need expanding.

comment:3 Changed 5 years ago by Mitar

Cc: mmitar@… added

+1

comment:4 Changed 4 years ago by tim.dawborn@…

+1

comment:5 Changed 4 years ago by Julien Phalip <jphalip@…>

Resolution: fixed
Status: newclosed

In 293f7a21147ad94c92c7d5b3f33cbab2f87b001b:

Fixed #17797 -- Enabled support for PATCH requests in the dummy test client. Thanks to pfarmer for the suggestion and initial patch.

Note: See TracTickets for help on using tickets.
Back to Top