Comments (10)
Note: integration tests can be tricky, since 3LO requires user intervention to authorize tokens.
from python-docs-samples.
Is there an easy way to mock 3LO Flow? @jonparrott maybe has an idea?
from python-docs-samples.
The oauth2 decorators in oauth2client are well tested by that library specifically. No need to re-tread that ground, just test that the following:
- No credentials -> redirect to auth screen
- Has credentials -> gets through to page
from python-docs-samples.
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.
Fake one, and never actually use it.
from python-docs-samples.
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.
:/ 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.
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.
We'll have a good 3lo sample once the Flask 3LO Helper is merged.
from python-docs-samples.
Closing this as obsolete.
from python-docs-samples.
Related Issues (20)
- securitycenter.snippets.snippets_bigquery_export_test: test_list_bigquery_exports failed HOT 1
- securitycenter.snippets.snippets_bigquery_export_test: test_update_bigquery_exports failed HOT 1
- securitycenter.snippets.snippets_notification_test: test_list_notification_configs failed HOT 1
- dlp.snippets.Jobs.list_jobs_test: test_list_dlp_jobs_with_filter failed HOT 1
- healthcare.api-client.v1.dicom.dicomweb_test: test_dicomweb_search_instance_studies failed HOT 19
- healthcare.api-client.v1.dicom.dicomweb_test: test_dicomweb_retrieve_study failed HOT 19
- healthcare.api-client.v1.dicom.dicomweb_test: test_dicomweb_retrieve_rendered failed HOT 19
- healthcare.api-client.v1.dicom.dicomweb_test: test_dicomweb_delete_study failed HOT 19
- Update `generative-ai/function-calling` to remove role from FunctionResponse
- When I use videointelligence_v1p3beta1, I got "403 The caller does not have permission" error. HOT 4
- automl.beta.batch_predict_test: test_batch_predict failed HOT 14
- automl.snippets.batch_predict_test: test_batch_predict failed HOT 16
- automl.snippets.delete_dataset_test: test_delete_dataset failed HOT 16
- automl.snippets.language_entity_extraction_create_dataset_test: test_entity_extraction_create_dataset failed HOT 16
- automl.snippets.language_sentiment_analysis_create_dataset_test: test_sentiment_analysis_create_dataset failed HOT 16
- healthcare.api-client.v1.dicom.dicomweb_test: test_dicomweb_retrieve_instance failed HOT 18
- generative_ai.imagen.edit_image_mask_free_test: test_edit_image_mask_free failed HOT 1
- appengine.flexible.storage.main_test: test_upload failed HOT 1
- automl.snippets.list_operation_status_test: test_list_operation_status failed HOT 1
- bigquery-reservation.snippets.reservation_test: test_reservation_samples[rest] failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-docs-samples.