Re: [Django] #32929: AsyncRequestFactory.get() ignores data parameter

2021-07-15 Thread Django
#32929: AsyncRequestFactory.get() ignores data parameter
-+-
 Reporter:  Pochang Lee  |Owner:  Pochang
 |  Lee
 Type:  Bug  |   Status:  closed
Component:  Testing framework|  Version:  dev
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  AsyncTestClient, | Triage Stage:  Ready for
  AsyncRequestFactory|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by GitHub ):

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


Comment:

 In [changeset:"f6d3557aa13f33cfe2fa41094fc3d8a8b09c368c" f6d3557a]:
 {{{
 #!CommitTicketReference repository=""
 revision="f6d3557aa13f33cfe2fa41094fc3d8a8b09c368c"
 Fixed #32929 -- Fixed handling query strings in AsyncRequestFactory.
 }}}

-- 
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/066.128642340c9247155741e3ed5b5b1cc2%40djangoproject.com.


Re: [Django] #32929: AsyncRequestFactory.get() ignores data parameter

2021-07-15 Thread Django
#32929: AsyncRequestFactory.get() ignores data parameter
-+-
 Reporter:  Pochang Lee  |Owner:  Pochang
 |  Lee
 Type:  Bug  |   Status:  assigned
Component:  Testing framework|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  AsyncTestClient, | Triage Stage:  Ready for
  AsyncRequestFactory|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * stage:  Accepted => 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.897d3b4a9b7268f21519b1a28f11f4b4%40djangoproject.com.


Re: [Django] #32929: AsyncRequestFactory.get() ignores data parameter

2021-07-14 Thread Django
#32929: AsyncRequestFactory.get() ignores data parameter
-+-
 Reporter:  Pochang Lee  |Owner:  Pochang
 |  Lee
 Type:  Bug  |   Status:  assigned
Component:  Testing framework|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  AsyncTestClient, | Triage Stage:  Accepted
  AsyncRequestFactory|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Pochang Lee):

 * has_patch:  0 => 1


Comment:

 Replying to [comment:2 Mariusz Felisiak]:
 > Would you like to prepare a patch? (tests are also required).

 Yes, I have submitted a pull request.

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

-- 
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/066.45c0cf76eaf3e6915ef9c8d0b1135e17%40djangoproject.com.


Re: [Django] #32929: AsyncRequestFactory.get() ignores data parameter

2021-07-14 Thread Django
#32929: AsyncRequestFactory.get() ignores data parameter
-+-
 Reporter:  Pochang Lee  |Owner:  Pochang
 |  Lee
 Type:  Bug  |   Status:  assigned
Component:  Testing framework|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  AsyncTestClient, | Triage Stage:  Accepted
  AsyncRequestFactory|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * cc: Andrew Godwin, Carlton Gibson (added)
 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report, good catch. I think the following should do the
 trick:

 {{{
 diff --git a/django/test/client.py b/django/test/client.py
 index 4a0b6b45f4..b4c091aa5c 100644
 --- a/django/test/client.py
 +++ b/django/test/client.py
 @@ -547,6 +547,8 @@ class AsyncRequestFactory(RequestFactory):
  follow = extra.pop('follow', None)
  if follow is not None:
  s['follow'] = follow
 +if query_string := extra.pop('QUERY_STRING', None):
 +s['query_string'] = query_string
  s['headers'] += [
  (key.lower().encode('ascii'), value.encode('latin1'))
  for key, value in extra.items()
 }}}

 Would you like to prepare a patch? (tests are also required).

-- 
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/066.e3dab34528e5b6c9203877f4ee042653%40djangoproject.com.


Re: [Django] #32929: AsyncRequestFactory.get() ignores data parameter

2021-07-14 Thread Django
#32929: AsyncRequestFactory.get() ignores data parameter
-+-
 Reporter:  Pochang Lee  |Owner:  Pochang
 |  Lee
 Type:  Bug  |   Status:  assigned
Component:  Testing framework|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  AsyncTestClient, | Triage Stage:
  AsyncRequestFactory|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Pochang Lee):

 * version:  3.2 => dev


-- 
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/066.195a323c00ec4f989485da3f944bb1c8%40djangoproject.com.


[Django] #32929: AsyncRequestFactory.get() ignores data parameter

2021-07-14 Thread Django
#32929: AsyncRequestFactory.get() ignores data parameter
-+-
   Reporter:  Pochang|  Owner:  Pochang Lee
  Lee|
   Type:  Bug| Status:  assigned
  Component:  Testing|Version:  3.2
  framework  |   Keywords:  AsyncTestClient,
   Severity:  Normal |  AsyncRequestFactory
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 When passing data to AsyncRequestFactory.get(),
 the resulting request.GET always gives an empty QueryDict

 {{{
 >>> request_factory = AsyncRequestFactory()
 >>> request = request_factory.get('/somewhere/', {'var': '100'})
 >>> request.GET
 
 }}}

 while in synchronous

 {{{

 >>> request_factory = RequestFactory()
 >>> request = request_factory.get('/somewhere/', {'var': '100'})
 >>> request.GET
 

 }}}

 This also prevents AsyncClient.get() from passing GET parameters to view
 function.

-- 
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/051.a75e55e6490d574735fc4ef37e740d1e%40djangoproject.com.