Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1890 (closed defect: worksforme)

Opened 11 years ago

Last modified 11 years ago

TG2 request.body exhausted under unit tests

Reported by: cleverdevil Owned by: anonymous
Priority: normal Milestone: 2.0b1
Component: TurboGears Version: trunk
Severity: normal Keywords:


When running functional tests under TurboGears 2.0 preview release, and performing a POST, the request.body is always empty. It seems that something is reading/exhausting the environwsgi.input? at some stage in the pipeline, causing request.body to be empty. The code is confirmed as working outside of the test environment, but the test fails because request.body is empty.

A few notes: this POST is occurring on a sub-controller that is taking advantage of TG2's new lookup capabilities.

Change History

comment:1 Changed 11 years ago by mramm

  • Milestone set to 1.9.7a5

comment:2 Changed 11 years ago by mramm

  • Milestone changed from 1.9.7a5 to 2.0b1

comment:3 Changed 11 years ago by faide

could you post a test case that exposes the behaviour so that we can put someone to work on this matter during the upcoming sprint?

comment:4 Changed 11 years ago by jorge.vargas

I have been using this without trouble in one of my apps, so please post a test that breaks it's behavior, if not then I think we should close as invalid.

comment:5 Changed 11 years ago by cleverdevil

The feature we were testing here is now gone in our application, and I don't have the unit test around anymore. Its likely in our source control, but I don't believe we are having this problem anymore. It may have been solved between one of the early 1.9.7 alphas (when we reported this) and now. If it comes up again, we'll definitely file a ticket. Thanks!

comment:6 Changed 11 years ago by mramm

  • Status changed from new to closed
  • Resolution set to worksforme

I can't reproduce this. If it still happens in some cases, feel free to reopen the ticket.

Note: See TracTickets for help on using tickets.