Perhaps we should have a setting indicatin if we are running in
doctest mode, like we now have a gae mode.
That way we can safely work around it. Or we can assume we are in such
mode if some paramaters are empty, but that does not feel right.

On Sun, Jul 19, 2009 at 01:35, mdipierro<mdipie...@cs.depaul.edu> wrote:
>
> admin cannot be tested this way because assumes a request.env.
> request.env is empty when testing.
>
> On Jul 18, 5:57 pm, Hans Donner <hans.don...@pobox.com> wrote:
>> when running:
>>
>> > python web2y.py --test=admin
>>
>> I get the tollowing output:
>>
>> Traceback (most recent call last):
>>   File "E:\dev\web2py\web2py\dev-tests\web2py\gluon\restricted.py", line 
>> 178, in
>>  restricted
>>     exec ccode in environment
>>   File "applications\admin\models/access.py", line 27, in <module>
>>     port = int(request.env.server_port)
>> TypeError: int() argument must be a string or a number, not 'NoneType'
>>
>> also when I explictly give --port=8000
>>
>> In the try..except I can try to catch it with except TypeError, but then 
>> what?
>>
>> (welcome and examples are running fine like this)
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to