Add tests for web.py

Extract a small helper function out as well.
Pull out a small function

I want to make process_pull_request less of a beast and composed of
smaller parts that make testing easier.
Extract code and add some tests.

While the Processor class is a bit contrived, it makes adding some
simple 'are things wired up' tests much simpler.