[Issue 97] Backport filter by None fix.

* this does some minor refactoring of the tests so filters are on
  their own and the test infrastructure lets you specify mappings
* backports the fix for issue 97
* backports the test case for the fix

Fixes #97