Ticket #3585: 3585_with_test.diff

File 3585_with_test.diff, 1.2 KB (added by mattc, 7 years ago)

fix with test coverage

  • twisted/web/http.py

     
    715715                        self.channel.transport.loseConnection()
    716716                        return
    717717                    raise
     718            self.content.seek(0, 0)
    718719
    719720        self.process()
    720721
  • twisted/web/test/test_http.py

     
    809809                testcase.assertEquals(self.args["key"], ["value"])
    810810                testcase.assertEquals(self.args["empty"], [""])
    811811                testcase.assertEquals(self.args["multiple"], ["two words", "more words"])
     812                # This assertion should come last in case the self.args
     813                # attribute is someday set on demand; in that case,
     814                # self.content would be consumed on the first access
     815                # to self.args in the assertions above.
     816                testcase.assertEquals(self.content.read(), query)
    812817                testcase.didRequest = 1
    813818                self.finish()
    814819