@override_settings(DEV=True)
def assert_ua_redirects_to(self, ua, url_name, status_code=301):
    response = self.client.get(self.url, HTTP_USER_AGENT=ua)
    eq_(response.status_code, status_code)
    eq_(response['Vary'], 'User-Agent')
    eq_(response['Location'], ('http://testserver%s' % reverse(url_name)))
    query = '?ref=getfirefox'
    response = self.client.get((self.url + query), HTTP_USER_AGENT=ua)
    eq_(response.status_code, status_code)
    eq_(response['Vary'], 'User-Agent')
    eq_(response['Location'], (('http://testserver%s' % reverse(url_name)) + query))
@override_settings(DEV=True)
def assert_ua_redirects_to(self, ua, url_name, status_code=301):
    response = self.client.get(self.url, HTTP_USER_AGENT=ua)
    eq_(response.status_code, status_code)
    eq_(response['Vary'], 'User-Agent')
    eq_(response['Location'], ('http://testserver%s' % reverse(url_name)))
    query = '?ref=getfirefox'
    response = self.client.get((self.url + query), HTTP_USER_AGENT=ua)
    eq_(response.status_code, status_code)
    eq_(response['Vary'], 'User-Agent')
    eq_(response['Location'], (('http://testserver%s' % reverse(url_name)) + query))