prevents this:


    ======================================================================
    ERROR: test_no_user_agent (zamboni.mkt.site.tests.test_middleware.TestVaryMiddleware)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/chris/.virtualenvs/z/lib/python2.6/site-packages/mock.py", line 1189, in patched
        return func(*args, **keywargs)
      File "/opt/zamboni/../zamboni/mkt/site/tests/test_middleware.py", line 277, in test_no_user_agent
        r = self.client.get('/robots.txt', follow=True)
      File "/Users/chris/.virtualenvs/z/lib/python2.6/site-packages/django/test/client.py", line 439, in get
        response = super(Client, self).get(path, data=data, **extra)
      File "/Users/chris/.virtualenvs/z/lib/python2.6/site-packages/django/test/client.py", line 244, in get
        return self.request(**r)
      File "/Users/chris/.virtualenvs/z/lib/python2.6/site-packages/django/test/client.py", line 381, in request
        response = self.handler(environ)
      File "/Users/chris/.virtualenvs/z/lib/python2.6/site-packages/django/test/client.py", line 84, in __call__
        response = self.get_response(request)
      File "/Users/chris/.virtualenvs/z/lib/python2.6/site-packages/django/core/handlers/base.py", line 179, in get_response
        response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
      File "/Users/chris/.virtualenvs/z/lib/python2.6/site-packages/django/core/handlers/base.py", line 89, in get_response
        response = middleware_method(request)
      File "/opt/zamboni/mkt/regions/middleware.py", line 29, in process_request
        if not request.API:
    AttributeError: 'WSGIRequest' object has no attribute 'API'