hi,all:
I can't get correct request.application_url in nosetest
environment,it's always 80.
my test case like this:
class TestAny(TestController):
def test_any(self):
"""Tests to ensure that GET requests are prohibited"""
response = self.app.get(
url=url_for(controller='any', action='view', id= None)
)
print '-------------------------'
print response.req.application_url
print '-------------------------'
assert False # force print info
"any" controller is :
class AnyController(BaseController):
def view(self, id=None):
print 'request.application_url is :',request.application_url
return 'hello'
port settings in test.ini is :
[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 5000
the output is :
AssertionError:
-------------------- >> begin captured stdout << ---------------------
request.application_url is : http://localhost
-------------------------
http://localhost
-------------------------
check request.envrion,found 'SERVER_PORT' is 80, it should be 5000,Is
this a bug?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---