added a test suite for macros.py
debugged and fixed some errors in tests.py, and some errors that the tests exposed in the template tags documents. All tests now pass.