updated to use MagicMock instead of regular Mock for the web/tests.py