Show
Ignore:
Timestamp:
06/20/08 20:45:18 (7 months ago)
Author:
thijs
Message:

Adding branch for tickets #306, #316, #317

Location:
pyamf/branches/client-headers
Files:
2 modified
1 copied

Legend:

Unmodified
Added
Removed
  • pyamf/branches/client-headers/pyamf/tests/gateway/test_wsgi.py

    r1416 r1444  
    6565        def start_response(status, headers): 
    6666            self.assertEquals(status, '200 OK') 
    67             self.assertTrue(('Content-Type', 'application/x-amf') in headers) 
     67            self.assertTrue(('Content-Type', remoting.CONTENT_TYPE) in headers) 
    6868 
    6969        response = gw(env, start_response) 
  • pyamf/branches/client-headers/pyamf/tests/remoting/test_client.py

    r1432 r1444  
    371371 
    372372        dc.tc = self 
    373         dc.expected_headers = {'Content-Type': 'application/x-amf'} 
     373        dc.expected_headers = {'Content-Type': remoting.CONTENT_TYPE, 
     374                               'User-Agent': client.DEFAULT_USER_AGENT, 
     375                               'Referer': client.DEFAULT_REFERER} 
    374376 
    375377        service = gw.getService('baz', auto_execute=False) 
     
    378380        response = DummyResponse(200, '\x00\x00\x00\x00\x00\x01\x00\x0b/1/onRe' 
    379381            'sult\x00\x04null\x00\x00\x00\x00\x00\x02\x00\x05hello', { 
    380             'Content-Type': 'application/x-amf', 'Content-Length': 50}) 
     382            'Content-Type': remoting.CONTENT_TYPE, 'Content-Length': 50}) 
    381383        response.tc = self 
    382384 
     
    393395        response = DummyResponse(200, '\x00\x00\x00\x00\x00\x01\x00\x0b/2/onRe' 
    394396            'sult\x00\x04null\x00\x00\x00\x00\x00\x02\x00\x05hello', { 
    395             'Content-Type': 'application/x-amf'}) 
     397            'Content-Type': remoting.CONTENT_TYPE}) 
    396398        response.tc = self 
    397399 
     
    409411 
    410412        dc.tc = self 
    411         dc.expected_headers = {'Content-Type': 'application/x-amf'} 
     413        dc.expected_headers = {'Content-Type': remoting.CONTENT_TYPE, 
     414                               'User-Agent': client.DEFAULT_USER_AGENT, 
     415                               'Referer': client.DEFAULT_REFERER} 
    412416 
    413417        baz = gw.getService('baz', auto_execute=False) 
     
    419423            'sult\x00\x04null\x00\x00\x00\x00\x00\x02\x00\x05hello\x00\x0b/2/o' 
    420424            'nResult\x00\x04null\x00\x00\x00\x00\x00\x02\x00\x05hello', { 
    421                 'Content-Type': 'application/x-amf'}) 
     425                'Content-Type': remoting.CONTENT_TYPE}) 
    422426        response.tc = self 
    423427 
     
    437441 
    438442        response = DummyResponse(200, '\x00\x00\x00\x00\x00\x00', { 
    439             'Content-Type': 'application/x-amf'}) 
     443            'Content-Type': remoting.CONTENT_TYPE}) 
    440444 
    441445        dc.response = response 
     
    478482        response = DummyResponse(200, '\x00\x00\x00\x01\x00\x12AppendToGatewayUrl' 
    479483            '\x01\x00\x00\x00\x00\x02\x00\x05hello\x00\x00', { 
    480             'Content-Type': 'application/x-amf'}) 
     484            'Content-Type': remoting.CONTENT_TYPE}) 
    481485 
    482486        dc.response = response 
     
    492496        response = DummyResponse(200, '\x00\x00\x00\x01\x00\x11ReplaceGatewayUrl' 
    493497            '\x01\x00\x00\x00\x00\x02\x00\x10http://spam.eggs\x00\x00', { 
    494             'Content-Type': 'application/x-amf'}) 
     498            'Content-Type': remoting.CONTENT_TYPE}) 
    495499 
    496500        dc.response = response 
     
    505509        dc.response = DummyResponse(200, '\x00\x00\x00\x01\x00\x11ReplaceGatewayUrl' 
    506510            '\x01\x00\x00\x00\x00\x02\x00\x10http://spam.eggs\x00\x00', { 
    507             'Content-Type': 'application/x-amf'}) 
     511            'Content-Type': remoting.CONTENT_TYPE}) 
    508512 
    509513        gw._getResponse()