Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


"withFilter" method on the BaseResponse class #1253

merged 1 commit into from

3 participants

Ethan Jewett Antonio Salazar Cardozo Matt Farmer
Ethan Jewett

Copied from the mailing list:

I'm cleaning up deprecation warnings on the Apache ESME project. We have some old tests that use for-comprehensions with filters and these tests are resulting in deprecation warnings like the following:

[warn] /Users/esjewett/svn_repos/esme/trunk/server/src/test/scala/org/apache/esme/api/ApiTest.scala:95: `withFilter' method does not yet exist on net.liftweb.http.testing.HttpResponse, using `filter' method instead
[warn]         login <- post("/api/login", "token" -> "00000000") !@ "Login should have failed: bad token" if shouldnt(testSuccess(login))

Would a "withFilter" method need to be added to the BaseResponse class in Lift, or is there maybe something that needs to be fixed on the ESMEs side that I'm missing?

Information to recreate is below.

Offending test file:
SVN checkout URL:
SBT command to recreate warnings: sbt clean test (tested with sbt 0.11.2)

Antonio Salazar Cardozo Shadowfiend added this to the 2.6-M4 milestone
Antonio Salazar Cardozo

This seems like some pretty nice low-hanging fruit…

Matt Farmer farmdawgnation Add withFilter implementation to BaseResponse.
This is so it plays nice with for comprehensions.
Matt Farmer

Added it as an alias to filter. This class is a bit different than some of the collections, so this seemed to make the most sense.

Antonio Salazar Cardozo


Antonio Salazar Cardozo Shadowfiend merged commit 3f4868c into from
Antonio Salazar Cardozo Shadowfiend deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 30, 2014
  1. Matt Farmer

    Add withFilter implementation to BaseResponse.

    farmdawgnation authored
    This is so it plays nice with for comprehensions.
This page is out of date. Refresh to see the latest.
2  web/testkit/src/main/scala/net/liftweb/http/testing/TestFramework.scala
@@ -925,6 +925,8 @@ abstract class BaseResponse(override val baseUrl: String,
+ def withFilter(f: FuncType => Unit): FuncType = this.filter(f)
class CompleteFailure(val serverName: String, val exception: Box[Throwable]) extends TestResponse {
Something went wrong with that request. Please try again.