Skip to content

Commit

Permalink
add test scripts to double-check filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
paultag committed Mar 5, 2014
1 parent a248c9a commit 8e793f1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/test_filters.py
@@ -0,0 +1,16 @@
from billy.core import db
from billy_settings import LEGISLATOR_FILTERS
from billy.importers.filters import apply_filters
from dictdiffer import diff


filters = LEGISLATOR_FILTERS


for leg in db.legislators.find():
d1 = leg
leg = leg.copy()
d2 = apply_filters(filters, leg)
changes = list(diff(d1, d2))
if changes != []:
print leg['_id'], changes

0 comments on commit 8e793f1

Please sign in to comment.