[web2py] Testing testing...

2019-04-01 Thread António Ramos
Hello all what is the best way to test modules? also why nobody talks about tests in web2py when in every other framework they do it from the beggining. For starters its less noisy but when app grows we eventually need testing skills or we are doomed... PS i saw pytest with web2py and it seems

[web2py] Testing error

2017-07-27 Thread António Ramos
hello i get this error without any doctest written [image: Imagem inline 1] -- 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

Re: [web2py] testing applications

2017-04-18 Thread Marlysson Silva
You can use the webcliente and after construct the web2pyenv with data of webclient if this is possible.. -- 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) ---

Re: [web2py] testing applications

2017-04-16 Thread 黄祥
there is an example in the book about that, logged in user access the page that requires login ref : http://web2py.com/books/default/chapter/29/14/other-recipes#Functional-testing best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] testing applications

2017-04-16 Thread Carlos Cesar Caballero Díaz
Hi, there is no problem using the webclient approach, the problem is when I am using the web2pyenv approach ( simulating web2py shell environment), I find it very useful in some cases, but I can't use it with pages that requires registered users. Greetings. El 15/04/17 a las 20:54, Marlysson

Re: [web2py] testing applications

2017-04-15 Thread Marlysson Silva
You tried use the client web programatically of web2py to submit a post to users/login using your credentials? -- 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

Re: [web2py] testing applications

2017-04-15 Thread Carlos Cesar Caballero Díaz
Hi, it looks great. I am testing it and I'm getting issues when I try to test a controller who uses a "@auth.requires_login()" decorator using the web2pyenv approach. I am trying to log in a user using auth.login_bare(), but it always throws a 303 redirect. Any suggestion? Greetings. El

[web2py] testing applications

2017-04-14 Thread Marlysson Silva
Have this example: https://github.com/viniciusban/web2py.test -- 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

[web2py] testing applications

2017-04-11 Thread Carlos Cesar Caballero Díaz
Hi, is there a recommended way for implementing test on web2py apps? Greetings. -- 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

[web2py] testing Recaptcha failed on bizzard error

2016-04-06 Thread Richard
Hello, https://github.com/web2py/web2py/blob/master/gluon/tools.py#L848 request = request or current.request self.request_vars = request and request.vars or current.request.vars As request would contains current.request why are trying the following assignation... I think it

[web2py] Testing

2016-03-14 Thread Pierre Thibault
I do not see my messages in this group. -- 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

[web2py] Testing and web2py - especially appadmin

2015-02-05 Thread James O' Driscoll
I am currently working on creating tests for my default controller, I have found a few articles relating to web2py and unit testing, but not many. I have two questions: 1. Any recommendations for good resources available to help create tests for web2py. 2. Is there a doctest/unit test

[web2py] Testing local site on other machine

2013-12-02 Thread Ruud Schroen
Hi, I'm running web2py on my laptop with Ubuntu and i'd like to test my websites in IE. So i'd like to test my local web2py website my desktop, which is a Windows machine. How do i achieve this? Thanks in advance. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Testing local site on other machine

2013-12-02 Thread Marco Mansilla
El Mon, 2 Dec 2013 04:46:51 -0800 (PST) Ruud Schroen r...@formatics.nl escribió: Hi, I'm running web2py on my laptop with Ubuntu and i'd like to test my websites in IE. So i'd like to test my local web2py website my desktop, which is a Windows machine. How do i achieve this? Thanks

[web2py] Testing redirection with py.test

2013-10-28 Thread Vinicius Assef
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) -

[web2py] Testing if db insert was successful

2013-08-10 Thread Jordan Ladora
Hi, I'm unable to figure out how to check when a simple db insert() was successful. In my code below, regardless of whether the db insert is successful or not, the code after 'if new_record:' always executes.. new_record = db.abc.insert(a='this', b='that', c='theotherthing') if new_record:

[web2py] Testing your app using py.test

2013-04-03 Thread Vinicius Assef
Hi guys. I just published an example application with runnable test cases [1]. I don't like doctests, so I used py.test due to some reasons: - I don't need to subclass anything to make my test cases. - py.test understands unittest and nose tests. - py.test fixtures schema is (really) very

[web2py] Testing application with Pychecker

2012-02-20 Thread Oliver
Hi. I'm trying to run some tests on our application with Pychecker, but I'm getting this error: TypeError: __import__() takes at most 4 arguments (5 given) Anyone else got this error? Is it possible to test a whole web2py application with Pychecker? Regards, Oliver

[web2py] Testing trunk get error in external iframe on Welcome app index page

2011-09-13 Thread ron_m
I was testing trunk, ran the Welcome application and the Firebug debugger got a script error _gat not defined in file http://static.addtoany.com/menu/sm5.html line 1. Checking the DOM load of the index page I see an iframe iframe id=a2apage_sm_ifr width=1 height=1 frameborder=0 style=border:

[web2py] Testing ajax autocompletion as said in the book

2011-09-08 Thread António Ramos
hello i´m testing ajax auto completion example as said in the book it works fine Now i want to return not the months for the user to select but an image because i´m testing graphviz dot language! the user writes for example a-b an image is created . It see it in the image in the static folder

[web2py] Testing RESTful api with curl and JSON

2011-08-19 Thread Christian
Hello, I am following the restful APIs video on vimeo (http://vimeo.com/ 21133657) Now I am trying to test the manage_dog POST with curl: curl -i -H Accept: application/json -X POST -d info=aNewInfo, owner=55, name=aNewName http://localhost:8000/restful/api/manage_dog/ However, this gives a bad

[web2py] Testing accions that access the database.

2011-03-01 Thread Santiago
Hello, We need to create unit tests for accions that access the database. Does web2py provide tools to do this? The idea is to have a test purpose database and populate it with test data at the moment the tests run. Then, the test would use this fake data populated in the database. Thanks in

[web2py] testing ldap communication?

2011-02-11 Thread Panupat
I'm really stuck here, would greatly appreciate any help. Is there a way to check or test if the DAL is communicating with the ldap ad host? It seems like no matter what settings I used to the server and base_dn, even ones that are obviously wrong, I am only getting the same invalid login error.

[web2py] Testing model validation

2011-01-28 Thread blackthorne
I'm looking for a hook in web2py that allows me to check if a model is valid. It doesn't have to work 100%, but best-offer, kind of what we have on the web editor right after saving the model file. Is this possible to do for a given file? Thank you, Best regards

[web2py] Testing the new router

2011-01-16 Thread Kenneth Lundström
Hello, how do I test the new router that Jonathan has made. I renamed the routes.examples.py to routes.py and edited it. No mather what I write in it gets used. I tried to find the answer in all posts on the mailinglist but no success. Kenneth

Re: [web2py] Testing the new router

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 1:57 PM, Kenneth Lundström wrote: how do I test the new router that Jonathan has made. I renamed the routes.examples.py to routes.py and edited it. No mather what I write in it gets used. I tried to find the answer in all posts on the mailinglist but no success.

Re: [web2py] Testing the new router

2011-01-16 Thread Kenneth Lundström
Start with router.example.py instead. The key to using the new router is to define a dict named 'routers'. There's more documentation in the file, and I'll repost some examples below. Post your routes.py here, along with a description of what you intend that it does (if it's not obvious).

Re: [web2py] Testing the new router

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 2:42 PM, Kenneth Lundström wrote: I just added: routers = dict( BASE = dict( domains = { 'economy.nudata.fi' : 'economy', 'testing.nudata.fi' : 'testapplication', } ), ) but if if go to economy.nudata.fi I get to

Re: [web2py] Testing the new router

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 2:42 PM, Kenneth Lundström wrote: Start with router.example.py instead. The key to using the new router is to define a dict named 'routers'. There's more documentation in the file, and I'll repost some examples below. Post your routes.py here, along with a

Re: [web2py] Testing the new router

2011-01-16 Thread Kenneth Lundström
Are you running the current trunk? There hasn't been a release with the new router yet. Try adding the abc line below (note the comma); you should get a complaint about an unknown key. I´m running the newest Nightly Built? One more question: does this work OK with the old routing logic? I

Re: [web2py] Testing the new router

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 3:26 PM, Kenneth Lundström wrote: Are you running the current trunk? There hasn't been a release with the new router yet. Try adding the abc line below (note the comma); you should get a complaint about an unknown key. I´m running the newest Nightly Built? One

Re: [web2py] Testing the new router

2011-01-16 Thread Kenneth Lundström
I'm not sure what's in the nightly build. The abc= line should tell us something, and I can give you a little more debugging depending on what it says. abc gave nothing, it loaded welcome without any errors, or were should I see any complaints about an unknown key? I´m running on linux,

Re: [web2py] Testing the new router

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 4:39 PM, Kenneth Lundström wrote: I'm not sure what's in the nightly build. The abc= line should tell us something, and I can give you a little more debugging depending on what it says. abc gave nothing, it loaded welcome without any errors, or were should I see

Re: [web2py] Testing the new router

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 4:39 PM, Kenneth Lundström wrote: I'm not sure what's in the nightly build. The abc= line should tell us something, and I can give you a little more debugging depending on what it says. The nightly is pretty old. Massimo?

Re: [web2py] Testing the new router

2011-01-16 Thread Kenneth Lundström
The nightly is pretty old. Where can you see if my upgrading to a trunk version worked? I did a hg clone https://web. and then copied everything to my web2py folder. Earlier I edited the routes file, now I noticed a new file named router.examples.py. I added those lines to it. But can´t

Re: [web2py] Testing the new router

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 5:08 PM, Kenneth Lundström wrote: The nightly is pretty old. Where can you see if my upgrading to a trunk version worked? I did a hg clone https://web. and then copied everything to my web2py folder. Earlier I edited the routes file, now I noticed a new file

Re: [web2py] Testing the new router

2011-01-16 Thread Kenneth Lundström
So far so good. You need to copy your router file to routes.py, though. If you cp router.example.py to routes.py and then replace the routers dict with yours, that should be a good start. I copied the file, changed ownership, permissions, but nothing. Not until I restarted Apache was the

Re: [web2py] Testing the new router

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 5:27 PM, Kenneth Lundström wrote: So far so good. You need to copy your router file to routes.py, though. If you cp router.example.py to routes.py and then replace the routers dict with yours, that should be a good start. I copied the file, changed ownership,

[web2py] testing

2010-12-03 Thread apple
just testing

Re: [web2py] testing

2010-12-03 Thread Branko Vukelic
SyntaxError: line 1: 'just testing' On Fri, Dec 3, 2010 at 4:00 PM, apple simo...@gmail.com wrote: just testing -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/

Re: [web2py] testing

2010-12-03 Thread Jonathan Lundell
On Dec 3, 2010, at 7:09 AM, Branko Vukelic wrote: SyntaxError: line 1: 'just testing' On Fri, Dec 3, 2010 at 4:00 PM, apple simo...@gmail.com wrote: just testing Google Groups has been having some problems today. fwiw.

[web2py] web2py testing release cycle

2010-10-30 Thread b00m_chef
I was just wondering if it would be possible to have the development team compile a list of features that need tests written for them. I would enjoy writing a few tests, though, I don't have time to dig through the whole code base and figure out on my own what needs testing. Ideally, if you guys

[web2py] Re: web2py testing release cycle

2010-10-30 Thread Luther Goh Lu Feng
+1 Count me in. I am pretty new to python. But I am sure there are at least one or two simple test cases for me to write tests for. On Oct 31, 1:30 am, b00m_chef r...@devshell.org wrote: I was just wondering if it would be possible to have the development team compile a list of features that

Re: [web2py] Re: web2py testing release cycle

2010-10-30 Thread Albert Abril
Ok. Count on me too. I can't organize this, because I'm not an expert in tests, but can contribute with testing. Regards! On Sat, Oct 30, 2010 at 9:03 PM, Luther Goh Lu Feng elf...@yahoo.comwrote: +1 Count me in. I am pretty new to python. But I am sure there are at least one or two simple

Re: [web2py] testing app-specific routing

2010-08-10 Thread Jonathan Lundell
On Aug 9, 2010, at 10:25 PM, Thadeus Burgess wrote: Where is the documentation on how to use it? I sent an email on the subject, and there are comments in routes.example.py. Tomorrow I'll try to add some info to the book in time for Massimo's deadline. Hang on just a minute and I'll try to

Re: [web2py] testing app-specific routing

2010-08-09 Thread Thadeus Burgess
Where is the documentation on how to use it? -- Thadeus On Mon, Aug 9, 2010 at 5:43 PM, Jonathan Lundell jlund...@pobox.com wrote: Has any tried the new app-specific routing in the trunk? Plan to try it soon?

[web2py] testing routes.py patterns

2010-08-08 Thread Jonathan Lundell
I've been advocating the use of doctests in routes.py to debug problems. Here's another doctest you can use (I'll send a patch to Massimo that adds an example). compile_re('.*http://otherdomain.com.* (?Pany.*)', '/app/ctr\gany')[0].pattern '^.*http://otherdomain.com.* (?Pany.*)$'

Re: [web2py] testing routes.py patterns

2010-08-08 Thread Jonathan Lundell
On Aug 8, 2010, at 8:31 AM, Jonathan Lundell wrote: I've been advocating the use of doctests in routes.py to debug problems. Here's another doctest you can use (I'll send a patch to Massimo that adds an example). compile_re('.*http://otherdomain.com.* (?Pany.*)',

Re: [web2py] Testing an upload function

2010-05-16 Thread Mathieu Clabaut
Thank you for the directions. I'll try something like that and keep you informed of my progress... -Mathieu On Sat, May 15, 2010 at 22:56, Thadeus Burgess thade...@thadeusb.comwrote: I attempted to solve this by inserting data into the request environment, including the form name, however I

Re: [web2py] Testing an upload function

2010-05-16 Thread Mathieu Clabaut
I finally did the following (using a storage with 'filename' and 'file' attributes) without using webtest which seems to work : request.function='upload_photo' resp = upload_photo() photo = Storage() photo.filename = os.path.basename(filename)

[web2py] Testing an upload function

2010-05-15 Thread Mathieu Clabaut
Hello, I'd like to test an upload function in my default controller (I use Thadeus testrunner from web2py_utils). I wonder what object I shall put in my request.post_vars.file where 'file' is the upload field ? Apparently it should have a 'filename' attribute and a read method ? Any tip on

Re: [web2py] Testing an upload function

2010-05-15 Thread Thadeus Burgess
I attempted to solve this by inserting data into the request environment, including the form name, however I did not have any luck.. I would use WebTest for file upload testing instead, however you will need to use a mixture of webtest and new_env(), this is because you need to get the unique

[web2py] testing the CRM appliance

2010-03-10 Thread mat --
Hi I am new to Web2py. I am currently testing the CRM appliance which i downloaded from: http://www.web2py.com/appliances/default/show/57 I was happy to be able to easily deploy it to GAE. I have hit a few errors / bugs (?) while clicking around. Should I post them here on the list, on

[web2py:29984] web2py testing example(s)

2009-09-03 Thread Scott Hunter
Could someone point me to good (however you define good) example of test code for a web2py appliance? It looks like the test links in admin only refer to doctests, but I can't find examples of what these might look like for a web2py appliance. There is an entry in AlterEgo (#213) which sets

[web2py:29990] Re: web2py testing example(s)

2009-09-03 Thread Yarko Tymciurak
have you looked through the gluon/tests folder? you can browse it on launchpad if you are not running from the source version: http://bazaar.launchpad.net/~mdipierro/web2py/devel/files On Thu, Sep 3, 2009 at 3:41 PM, Crabby shun...@nycap.rr.com wrote: In particular, the approach from