def test_get_response_content_type_omits_parameters(self): response = httplib2.Response( {"content-type": "application/json; charset=utf-8"} ) self.assertEqual( "application/json", utils.get_response_content_type(response) )
def test_get_response_content_type_return_None_when_type_not_found(self): response = httplib2.Response({}) self.assertIsNone(utils.get_response_content_type(response))
def test_get_response_content_type_returns_content_type_header(self): response = httplib2.Response({"content-type": "application/json"}) self.assertEqual("application/json", utils.get_response_content_type(response))