mozilla/ichnaea — pull request #266 by graydon (2014-07-01 01:26:50+00:00)
Title: Bug 238 further blacklisting work

Three changesets here, easiest if you review them separately.

The first untangles a bunch of confusion in the existing blacklist path:
- Separates blacklisting from incomplete-cell-measure handling
- Renames `mark_moving_stations` to clarify that it adds blacklist records and removes station records
- Renames `update_station_counts` to clarify that it actually _creates_ station records too
- Drops blacklisted measures on ingress, no point keeping them

The second adds somewhat-more-thorough tests of blacklisting, repeatedly adding measures from new locations around the US and watching the blacklist records toggle into and out of active state, finally locking into a permanent state.

The third just tidies up unified code paths to use `{to,join}_wifikey` helpers rather than manual lambdas.

I am _vaguely_ concerned about this PR only because the tests work when run singly (each function), and as a batch (via `make test`), but curiously fail when run with a module-level or class-level nosetest glob (`ichnaea.service.submit.tests.test_tasks` or `ichnaea.service.submit.tests.test_tasks:TestInsert`).

I do not know why and I haven't been able to isolate it, feel free to poke around to try to figure it out, I'd be curious to know!