rapidsms/rapidsms — pull request #216 by copelco (2012-11-26 16:21:45+00:00)
Title: Simplify test harness architecture

I've been thinking about improving the core test suite over the past few days and have come up with a few changes to make things cleaner. In short, I wanted to have a TestCase class that could be used for most testing scenarios (no all, obviously) that would allow you to easily inspect inbound/outbound messages, including messages sent to ``mockbackend``, and easily add/remove apps to test.

This PR includes:

* Add ``RapidTest`` and ``RapidTransactionTest`` base classes
* Modify get_router() to return an instantiated object rather than a class
* Update ``TestRouterMixin`` to patch ``RAPIDSMS_ROUTER`` directly with instantiated ``TestRouter``
* Remove global variables/state from ``TestRouter``
* Clean up documentation and focus more on ``RapidTest`` and ``RapidTransactionTest`` classes
* Remove MockBackendRouter test class
* Update TestScript to use RapidTest

I'm still finishing up the docs, but let me know what you think!