Re: [Django] #27516: Optimize test client response.json()

2024-02-16 Thread Django
#27516: Optimize test client response.json()
-+-
 Reporter:  Adam Johnson |Owner:  Adam
 Type:   |  Johnson
  Cleanup/optimization   |   Status:  closed
Component:  Testing framework|  Version:  1.10
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Mounir):

 Sorry for revisiting this old issue.

 I recently ran into trouble debugging a test. The test involved retrieving
 JSON results and popping keys from them via a variable:


 {{{
 response_data = response.json()
 item1 = response_data.pop('item1')
 }}}


 While debugging, I was puzzled as to why the URL returned incomplete data.
 I had assumed that calling response.json() would return the full JSON
 data, but due to the caching mechanism in place, this wasn't the case.

 Comparing this behaviour to the requests library, which has no caching,
 leads to different user expectations. Some users may find this distinction
 difficult to grasp.
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018db1c8bd55-8c03423b-9a03-4798-9c08-6f48a331c3e4-00%40eu-central-1.amazonses.com.


Re: [Django] #27516: Optimize test client response.json()

2016-11-21 Thread Django
#27516: Optimize test client response.json()
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  closed
Component:  Testing framework|  Version:  1.10
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"19e2114634c322d5a58f3dd282a3a3cfd0f5aa24" 19e21146]:
 {{{
 #!CommitTicketReference repository=""
 revision="19e2114634c322d5a58f3dd282a3a3cfd0f5aa24"
 Fixed #27516 -- Made test client's response.json() cache the parsed JSON.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.d07b80aec1aebc4a6638116e0a1cec78%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27516: Optimize test client response.json()

2016-11-21 Thread Django
#27516: Optimize test client response.json()
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  assigned
Component:  Testing framework|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * stage:  Unreviewed => Ready for checkin


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.2a6a96d84d6802b32ad42d5b9f9ea11b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27516: Optimize test client response.json()

2016-11-20 Thread Django
#27516: Optimize test client response.json()
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  assigned
Component:  Testing framework|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam Chainz):

 * cc: me@… (added)
 * owner:  nobody => Adam Chainz
 * has_patch:  0 => 1
 * status:  new => assigned


Comment:

 https://github.com/django/django/pull/7584

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.9280140166b415bc38df54455a074862%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.