Ticket #316: test-316.py

File test-316.py, 0.6 KB (added by thijs, 5 months ago)

referer test app

Line 
1import logging
2logging.basicConfig(level=logging.DEBUG,
3           format='%(asctime)s %(levelname)-5.5s [%(name)s] %(message)s')
4
5from pyamf.remoting.client import RemotingService
6
7client = RemotingService('http://demo.pyamf.org/gateway/helloworld')
8service = client.getService('echo')
9
10print 'Without referer:', service.echo('Hello World!')
11
12
13client = RemotingService('http://demo.pyamf.org/gateway/helloworld',
14                         referer='http://localhost/penis.py')
15service = client.getService('echo')
16
17print 'With referer:', service.echo('Hello World!')