title: Django test - 'HTTP_USER_AGENT' invalid keyword argument to test client
body: <p>My Django unit tests have stopped working. Instantiating the Django test client now fails with the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/vagrant/my/app/tests.py", line 43, in setUp
      self.client = Client(HTTP_USER_AGENT='Mozilla/5.0')
    File "/usr/local/lib/python2.6/dist-packages/Django-1.4.1-py2.6.egg/django/db/models/base.py", line 367, in __init__
      raise TypeError("'%s' is an invalid keyword argument for this function" % kwargs.keys()[0])
  TypeError: 'HTTP_USER_AGENT' is an invalid keyword argument for this function
  </code></pre>
  
  <p>They fail when I instantiate the Django test client. </p>
  
  <pre><code>from django.test.client import Client
  ...
  
  class MyAppTestCase(TestCase):
      base_fixtures = ['fixtures.json']
  
      def setUp(self):
          self.client = Client(HTTP_USER_AGENT='Mozilla/5.0') # fails here
          self.setupSession()
          self.authenticateUser()
  </code></pre>
  
  <p>When I run python manage.py shell and enter the following, it works fine. </p>
  
  <pre><code>vagrant@lucid32:/var/www/mytraps.com/spensa$ python manage.py shell
  Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
  [GCC 4.4.3] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  (InteractiveConsole)
  &gt;&gt;&gt; from django.test.client import Client
  &gt;&gt;&gt; client = Client(HTTP_USER_AGENT='Mozilla/5.0')
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>Any thoughts on why it is chocking on the HTTP_USER_AGENT keyword? </p>