I use nose and unittest to test my code, some of which involves interacting with external (web) API's that require some form of authentication (OAuth, for example). What, and where, is the proper way to define/retrieve constants that are a) required for running the tests, and b) not OK to expose publicly?
Why I (think) I need this:
Some of my code uploads for video's on Youtube. Other parts interact with other Google API's. The unittests for both need the same OAuth credentials. Google forbids me from just including a throwaway pair in the code I upload to GitHub, so people wanting to run the unittests will need to supply their own (freely acquireable) OAuth application-credentials
Aucun commentaire:
Enregistrer un commentaire