Testing for Python

58 views
Skip to first unread message

Jonás Mora

unread,
Nov 27, 2014, 3:49:30 PM11/27/14
to google-a...@googlegroups.com
I'm having troubles figuring out how to properly test my gae app.

I already read these articles:

But I'm still not sure how to proceed, for example, how do I stub a remote component such as bigquery or a ftp server?

I would really appreciate some guidance or recommended lecture, thanks!

Renzo Nuccitelli

unread,
Dec 1, 2014, 10:41:57 AM12/1/14
to google-a...@googlegroups.com
Hi Jonás,

Once I tested an integration with payment service like paypall. The important thing is that you want to test if your sistem does the right thing according to the service responses. So what I had done was mocking the service itself returning, returning the controlled responses (XML on that case, but could be anything) when doing my tests. This way they become independent of network or the service itself, making testing quicker and easier.

Just take a look on Mock library (https://pypi.python.org/pypi/mock) to see how to do this.

I hope it helps you.

Regards,
Renzo Nuccitelli

Jonas Mora

unread,
Dec 2, 2014, 6:35:50 AM12/2/14
to google-a...@googlegroups.com
Hello Renzo,

I really appreciate your answer, thanks!

Jonas.

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/KEP8sxzCraE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages