feat(auth): Add auth emulator support via the FIREBASE_AUTH_EMULATOR_HOST environment variable. by muru · Pull Request #531 · firebase/firebase-admin-python

yuchenshi

hiranya911

@hiranya911 hiranya911 changed the title Add auth emulator support via the FIREBASE_AUTH_EMULATOR_HOST environment variable. feat(auth): Add auth emulator support via the FIREBASE_AUTH_EMULATOR_HOST environment variable.

Feb 11, 2021

hiranya911

hiranya911

hiranya911

hiranya911

hiranya911

@muru

To minimize modification of tests, the app fixture and instrumentation
have been modified to use a global dict of URLs, which are then
monkey-patched based on fixture parameters. Essentially, all tests using
the app fixture are run twice, once with the emulated endpoint and once
without.

@muru

@muru

@muru

Where possible, tests are modified to account for the current behaviour
in emulator mode (e.g., invalid or expired tokens or cookies still
work).

Fixtures were changed to function scope to avoid problems caused by
overlap when some fixtures being in emulator mode and some in normal
mode concurrently.

hiranya911