def test_data(self): result = parse_request_meta({ 'REQUEST_METHOD': 'GET', 'HTTP_HOST': 'aa.com', 'HTTP_ORIGIN': 'http://bb.com', 'HTTP_REFERER': 'http://cc.com/somewhere', 'HTTP_X_REQUESTED_WITH': 'ddd', }) expected = ('GET', 'bb.com', 'cc.com', 'ddd') self.assertEqual(expected, result)
def test_none(self): result = parse_request_meta({}) self.assertEqual(('', None, None, None), result)
def test_none(self): result = parse_request_meta({}) self.assertEqual(('', None, None, None, None), result)