Skip to content

Commit

Permalink
tests: change test env vars before documenting them in the wiki
Browse files Browse the repository at this point in the history
It should be clear these are for testing so put `TEST_` in their name.

The name names are:

 * SAMBAL_TEST_HOST
 * SAMBAL_TEST_USERNAME
 * SAMBAL_TEST_PASSWORD
 * SAMBAL_TEST_REALM

There is no need to change the settings keys, just the env vars is enough.
  • Loading branch information
robvdl committed Mar 8, 2024
1 parent 1f90216 commit ad19358
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
def settings():
"""Fixture that returns the Pyramid settings dict."""
test_settings = dict(sambal.SETTINGS)
test_settings["samba.host"] = os.getenv("SAMBAL_SAMBA_HOST")
test_settings["samba.username"] = os.getenv("SAMBAL_SAMBA_USERNAME")
test_settings["samba.password"] = os.getenv("SAMBAL_SAMBA_PASSWORD")
test_settings["samba.realm"] = os.getenv("SAMBAL_SAMBA_REALM")
test_settings["samba.host"] = os.getenv("SAMBAL_TEST_HOST")
test_settings["samba.username"] = os.getenv("SAMBAL_TEST_USERNAME")
test_settings["samba.password"] = os.getenv("SAMBAL_TEST_PASSWORD")
test_settings["samba.realm"] = os.getenv("SAMBAL_TEST_REALM")
test_settings["http_host"] = "example.com"
return test_settings

Expand Down

0 comments on commit ad19358

Please sign in to comment.