Code Monkey home page Code Monkey logo

Comments (10)

jerjou avatar jerjou commented on June 7, 2024

Note: integration tests can be tricky, since 3LO requires user intervention to authorize tokens.

from python-docs-samples.

elibixby avatar elibixby commented on June 7, 2024

Is there an easy way to mock 3LO Flow? @jonparrott maybe has an idea?

from python-docs-samples.

theacodes avatar theacodes commented on June 7, 2024

The oauth2 decorators in oauth2client are well tested by that library specifically. No need to re-tread that ground, just test that the following:

  1. No credentials -> redirect to auth screen
  2. Has credentials -> gets through to page

from python-docs-samples.

jerjou avatar jerjou commented on June 7, 2024

Yeah - how do you set up the has-credentials scenario? Do we just generate a refresh token for one of our accounts and put that in the repo? That sounds all kinds of sketch :)

from python-docs-samples.

theacodes avatar theacodes commented on June 7, 2024

Fake one, and never actually use it.

from python-docs-samples.

jerjou avatar jerjou commented on June 7, 2024

Trouble is, if we want the test to be an integration test, we'll want the api call to actually be authenticated, so we can verify we're getting the expected (successful) response.
For unit tests, of course, we can mock to our heart's content.

from python-docs-samples.

theacodes avatar theacodes commented on June 7, 2024

:/ well, hmm, we should either see if we can obtain a test account specifically for this, or only do the int test for 2lo.

from python-docs-samples.

elibixby avatar elibixby commented on June 7, 2024

Internally we have a way to get dummy accounts that don't last. Which I have been using to test my 3LO stuff. But this is a larger problem with Travis being on the other side of SSO.

from python-docs-samples.

theacodes avatar theacodes commented on June 7, 2024

We'll have a good 3lo sample once the Flask 3LO Helper is merged.

from python-docs-samples.

theacodes avatar theacodes commented on June 7, 2024

Closing this as obsolete.

from python-docs-samples.

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.