Created
September 12, 2017 04:52
-
-
Save tkmru/c3aee5f2cba54f3ceac22c26bd4e2dc9 to your computer and use it in GitHub Desktop.
change env variable for using EnvironmentVarGuard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from test.support import EnvironmentVarGuard | |
class TestConnection(unittest.TestCase): | |
pass | |
if __name__ == "__main__": | |
env = EnvironmentVarGuard() | |
env.set('DEVELOP_USER', 'test_user') | |
env.set('DEVELOP_PASSWORD', 'test_password') | |
with env: | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment