'Test the redirect handler using urllib2'

@attr('moth')
def test_redirect_handler(self):

    redirect_url = URL(get_moth_http(self.REDIRECT_URL))
    opener = urllib2.build_opener(HTTP30XHandler)
    request = urllib2.Request(redirect_url.url_string)
    response = opener.open(request)
    self.assertEqual(response.code, FOUND)
