Hello Mirek,

Did you give a look at how web2py.test is doing that?

Bassically, a folder is created with the name of the app when at tests
launch if the folder is there the testing database is used...

Richard

On Tue, Jul 26, 2016 at 6:24 AM, Mirek Zvolský <[email protected]> wrote:

> Finally I realized it using
>
> session.testing = False / True
>
> Because I think the resulting plugin_splinter is interesting (for
> somebody),
> I hope I will publish it and write more later.
>
>
>
>
>
>
> Dne pondělí 18. července 2016 11:55:57 UTC+2 Mirek Zvolský napsal(a):
>>
>> 1.
>>
>> I use postgres database dbapp
>> I am trying to make splinter tests and want to run them over the 2nd
>> database dbapp_tests.
>>
>> When I switch to the testing database (which is EMPTY include the
>> auth_user table)
>> I am logged in thanks the session:
>> auth.user and auth.user_id are both set (but auth_user is EMPTY).
>>
>> Can I avoid this, without deleting sessions for the normal work?
>>
>>
>>
>> I have ideas for some workarounds, like:
>>
>> - populate dbapp_tests with single auth_user row (mine...)
>>
>> - move sessions into database
>>
>>
>>
>> But I'm asking, if somebody has idea how to switch both databases more
>> clever.
>> Thank you...
>>
>>
>> 2.
>>
>> I have no good idea how to easy switch between normal and testing
>> database.
>> At this time I use port (8000/8001), but this works on development, not
>> on production.
>> What is better?
>>
>> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to