-
-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2516006
commit e24a426
Showing
7 changed files
with
62 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
EXAMPLE = True | ||
EXAMPLE = True |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ | |
|
||
def test_has_wrapped(): | ||
assert settings.configured is True | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import os | ||
|
||
|
||
def test_end_to_end(settings): | ||
""" | ||
settings is fixture configured in conftest.py | ||
""" | ||
assert settings.HOSTNAME == 'host.com' | ||
|
||
assert settings.PORT == 5000 | ||
assert isinstance(settings.PORT, int) | ||
|
||
assert settings.VALUE == 42.1 | ||
assert isinstance(settings.VALUE, float) | ||
|
||
assert settings.DEBUG is True | ||
assert isinstance(settings.DEBUG, bool) | ||
|
||
assert settings.ALIST == ["item1", "item2", "item3"] | ||
assert isinstance(settings.ALIST, list) | ||
assert len(settings.ALIST) == 3 | ||
|
||
assert settings.ADICT == {"key": "value"} | ||
assert isinstance(settings.ADICT, dict) | ||
assert 'key' in settings.ADICT | ||
|
||
assert settings.get('FOO', default='bar') == 'bar' | ||
|
||
with settings.using_namespace('PROJECT1'): | ||
assert settings.HOSTNAME == 'otherhost.com' | ||
|
||
assert settings.HOSTNAME == 'host.com' | ||
|
||
if os.environ.get('TRAVIS'): | ||
assert settings.ENV_BOOLEAN is True | ||
assert settings.OTHER_TESTING is True | ||
assert settings.ENV_INT == 42 | ||
assert settings.ENV_FLOAT == 42.2 | ||
assert settings.ENV_LIST == ["dyna", "conf"] | ||
assert settings.ENV_PURE_INT == '42' | ||
assert settings.as_int('ENV_PURE_INT') == 42 | ||
assert settings.get('ENV_PURE_INT', cast='@int') == 42 |