Changeset 1444 for pyamf/branches/client-headers/pyamf/tests
- Timestamp:
- 06/20/08 20:45:18 (7 months ago)
- Location:
- pyamf/branches/client-headers
- Files:
-
- 2 modified
- 1 copied
-
. (copied) (copied from pyamf/trunk)
-
pyamf/tests/gateway/test_wsgi.py (modified) (1 diff)
-
pyamf/tests/remoting/test_client.py (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pyamf/branches/client-headers/pyamf/tests/gateway/test_wsgi.py
r1416 r1444 65 65 def start_response(status, headers): 66 66 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) 68 68 69 69 response = gw(env, start_response) -
pyamf/branches/client-headers/pyamf/tests/remoting/test_client.py
r1432 r1444 371 371 372 372 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} 374 376 375 377 service = gw.getService('baz', auto_execute=False) … … 378 380 response = DummyResponse(200, '\x00\x00\x00\x00\x00\x01\x00\x0b/1/onRe' 379 381 '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}) 381 383 response.tc = self 382 384 … … 393 395 response = DummyResponse(200, '\x00\x00\x00\x00\x00\x01\x00\x0b/2/onRe' 394 396 'sult\x00\x04null\x00\x00\x00\x00\x00\x02\x00\x05hello', { 395 'Content-Type': 'application/x-amf'})397 'Content-Type': remoting.CONTENT_TYPE}) 396 398 response.tc = self 397 399 … … 409 411 410 412 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} 412 416 413 417 baz = gw.getService('baz', auto_execute=False) … … 419 423 'sult\x00\x04null\x00\x00\x00\x00\x00\x02\x00\x05hello\x00\x0b/2/o' 420 424 'nResult\x00\x04null\x00\x00\x00\x00\x00\x02\x00\x05hello', { 421 'Content-Type': 'application/x-amf'})425 'Content-Type': remoting.CONTENT_TYPE}) 422 426 response.tc = self 423 427 … … 437 441 438 442 response = DummyResponse(200, '\x00\x00\x00\x00\x00\x00', { 439 'Content-Type': 'application/x-amf'})443 'Content-Type': remoting.CONTENT_TYPE}) 440 444 441 445 dc.response = response … … 478 482 response = DummyResponse(200, '\x00\x00\x00\x01\x00\x12AppendToGatewayUrl' 479 483 '\x01\x00\x00\x00\x00\x02\x00\x05hello\x00\x00', { 480 'Content-Type': 'application/x-amf'})484 'Content-Type': remoting.CONTENT_TYPE}) 481 485 482 486 dc.response = response … … 492 496 response = DummyResponse(200, '\x00\x00\x00\x01\x00\x11ReplaceGatewayUrl' 493 497 '\x01\x00\x00\x00\x00\x02\x00\x10http://spam.eggs\x00\x00', { 494 'Content-Type': 'application/x-amf'})498 'Content-Type': remoting.CONTENT_TYPE}) 495 499 496 500 dc.response = response … … 505 509 dc.response = DummyResponse(200, '\x00\x00\x00\x01\x00\x11ReplaceGatewayUrl' 506 510 '\x01\x00\x00\x00\x00\x02\x00\x10http://spam.eggs\x00\x00', { 507 'Content-Type': 'application/x-amf'})511 'Content-Type': remoting.CONTENT_TYPE}) 508 512 509 513 gw._getResponse()
