Code Monkey home page Code Monkey logo

Comments (6)

proppy avatar proppy commented on May 17, 2024

You could use gcd: the local development server, see:
https://developers.google.com/datastore/docs/tools/devserver

from google-cloud-python.

jgeewax avatar jgeewax commented on May 17, 2024

That looks good for local development. It runs on Java right ?

I wonder how difficult it would be to patch in the stubs from AppEngine's dev_appserver.py so that i can use something akin to ext.testbed to unittest locally (ie, without hitting the wire, stay all in Python).

from google-cloud-python.

proppy avatar proppy commented on May 17, 2024

That looks good for local development. It runs on Java right ?

Yes, it is embedding the App Engine Java development server and running the same servlet that is running in production.

I wonder how difficult it would be to patch in the stubs from AppEngine's dev_appserver.py so that i can use something akin to ext.testbed to unittest locally (ie, without hitting the wire, stay all in Python).

You would have to handle the datastore_v1.proto to datastore_v4 convertion somehow.

Keep in mind that datastore_v4 private interface is not really documented and also subject to change: datastore_v1 is the public versionned interface.

from google-cloud-python.

jgeewax avatar jgeewax commented on May 17, 2024

Yikes. Well I realllly don't want to force people to spin up a local server in order to run unit tests...

We'll have to come up with a way to stub this out.

from google-cloud-python.

tseaver avatar tseaver commented on May 17, 2024

#130 adds 100% unit test coverage for modules in gcloud, gcloud.datastore. I would call its strategy "stubbing" (testcases explicitly stub out the http or connection objects) rather than "mocking" (using a general-purpose utilitiy like 'mock').

from google-cloud-python.

tseaver avatar tseaver commented on May 17, 2024

#106 exists to cover the deficiencies of testing with stubbed / mocked backends.

from google-cloud-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.