Wrote this to get started : # -*- coding: utf8 -*-
# Create a python virtual environnement cd mkdir projects virtualenv ~/projets/web2py.test # Access the environnement source ~/projects/web2py.test/bin/activate # Now your prompt should look like this : # (web2py.test)username@yourmachine:~$ # Go in ~/projets/web2py.test cd ~/projects/web2py.test # Get last web2py stable wget http://www.web2py.com/examples/static/web2py_src.zip # Unpack it unzip web2py_src.zip # Go in web2py/applications/ cd web2py/applications/ # Get the last web2py.test app wget https://github.com/viniciusban/web2py.test/archive/master.zip # Unpack it unzip master.zip # Rename mv web2py.test-master/ people # You are read for the rest Attach it... :) Richard On Mon, Nov 4, 2013 at 8:48 PM, Richard Vézina <ml.richard.vez...@gmail.com>wrote: > Hello Vinicius, > > I have been able to run tests, one failed though : > > =================================================================================== > test session starts > =================================================================================== > platform linux2 -- Python 2.7.4 -- pytest-2.4.2 -- > /home/noitulove/projets/web2py.test/bin/python > collected 11 items > > applications/people/tests/controllers/test_people_controller_web2pyenv.py:15: > test_index_exists PASSED > applications/people/tests/controllers/test_people_controller_web2pyenv.py:29: > test_new_person_with_form PASSED > applications/people/tests/controllers/test_people_controller_web2pyenv.py:50: > test_validate_new_person FAILED > > ======================================================================================== > FAILURES > ========================================================================================= > ________________________________________________________________________________ > test_validate_new_person > _________________________________________________________________________________ > > web2py = <Storage {'Service': <class 'gluon.tools.Service'>, 'OBJECT': > <class 'gluon.ht...ytest/web2pytest.pyc'>, 'T': <gluon.languages.translator > object at 0x333c450>}> > > def test_validate_new_person(web2py): > '''Is the form validating? > ''' > > from gluon.compileapp import run_controller_in > > data = dict( > name='', > phone='', > _formname='new_person_form', > ) > > web2py.request.post_vars.update(data) > result = run_controller_in('people', 'new_person', web2py) > > > assert result['form'].errors > E assert <Storage {}> > E + where <Storage {}> = <gluon.sqlhtml.SQLFORM object at > 0x335c650>.errors > > applications/people/tests/controllers/test_people_controller_web2pyenv.py:65: > AssertionError > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > Interrupted: stopping after 1 failures > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > =========================================================================== > 1 failed, 2 passed in 0.25 seconds > ========================================================================== > > I use web2py 2.7.4 > > I will start to study it. > > :) > > Richard > > > On Thu, Oct 31, 2013 at 4:08 PM, Vinicius Assef <vinicius...@gmail.com>wrote: > >> Yes, that's the way to go. :-) >> >> On Thu, Oct 31, 2013 at 2:28 PM, Richard Vézina >> <ml.richard.vez...@gmail.com> wrote: >> > Wait, I didn't read carefully web2py.test more complex than I thought, I >> > thought it was just an app. >> > >> > I will set up a virtualenv. >> > >> > Richard >> > >> > >> > On Thu, Oct 31, 2013 at 12:08 PM, Richard Vézina >> > <ml.richard.vez...@gmail.com> wrote: >> >> >> >> Ok, I get web2py.test and web2py 2.7.4 (I will test at the same time >> that >> >> web2py.test works well with it). >> >> >> >> Now, https://gist.github.com/viniciusban/7206413 seems just a >> example... >> >> Should I just add it to web2py.test app? >> >> >> >> Richard >> >> >> >> >> >> On Thu, Oct 31, 2013 at 11:39 AM, Vinicius Assef < >> vinicius...@gmail.com> >> >> wrote: >> >>> >> >>> Thank you, Richard. >> >>> >> >>> Basically, I need to isolate web2py.test from my example app and >> >>> prepare better examples. >> >>> >> >>> >> >>> >> >>> On Thu, Oct 31, 2013 at 11:59 AM, Richard Vézina >> >>> <ml.richard.vez...@gmail.com> wrote: >> >>> > I would like to help you Vinicius, what could I do? >> >>> > >> >>> > Richard >> >>> > >> >>> > >> >>> > On Thu, Oct 31, 2013 at 6:29 AM, Vinicius Assef < >> vinicius...@gmail.com> >> >>> > wrote: >> >>> >> >> >>> >> Good idea. >> >>> >> >> >>> >> I'll make it, but it is based on a previous work [1]. I need >> improve >> >>> >> docs for it. >> >>> >> >> >>> >> [1] http://github.com/viniciusban/web2py.test >> >>> >> >> >>> >> On Thu, Oct 31, 2013 at 12:11 AM, Massimo Di Pierro >> >>> >> <massimo.dipie...@gmail.com> wrote: >> >>> >> > Can you please make a web2py slice about this? >> >>> >> > >> >>> >> > >> >>> >> > On Monday, 28 October 2013 18:13:22 UTC-5, viniciusban wrote: >> >>> >> >> >> >>> >> >> I created this gist to help people testing controllers that >> makes >> >>> >> >> redirection: >> >>> >> >> https://gist.github.com/viniciusban/7206413 >> >>> >> >> >> >>> >> >> Hope it helps someone. >> >>> >> > >> >>> >> > -- >> >>> >> > 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 web2py+unsubscr...@googlegroups.com. >> >>> >> > For more options, visit https://groups.google.com/groups/opt_out >> . >> >>> >> >> >>> >> -- >> >>> >> 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 web2py+unsubscr...@googlegroups.com. >> >>> >> For more options, visit https://groups.google.com/groups/opt_out. >> >>> > >> >>> > >> >>> > -- >> >>> > 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 web2py+unsubscr...@googlegroups.com. >> >>> > For more options, visit https://groups.google.com/groups/opt_out. >> >>> >> >>> -- >> >>> 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 web2py+unsubscr...@googlegroups.com. >> >>> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> >> > >> > -- >> > 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 web2py+unsubscr...@googlegroups.com. >> > For more options, visit https://groups.google.com/groups/opt_out. >> >> -- >> 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 web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
create_a_virtualenv_en.sh
Description: Bourne shell script