-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from Hashmap-Software-Agency/81-static_files_d…
…irectory_in_apps 81 static files directory in apps
- Loading branch information
Showing
6 changed files
with
80 additions
and
14 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
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
Binary file not shown.
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,32 @@ | ||
from tests.module_helper import PyttmanInternalBaseTestCase | ||
from pyttman.core.internals import Settings | ||
|
||
from importlib import import_module | ||
import pytest | ||
|
||
@pytest.fixture | ||
def mockSettings(): | ||
|
||
mock_settings = { | ||
"d":{ | ||
"k1":"v1", | ||
"k2":{ | ||
"a":"a", | ||
"b":"b" | ||
} | ||
}, | ||
"foo":"bar" | ||
} | ||
|
||
return Settings(**mock_settings) | ||
|
||
def test_read_settings_with_dictionary(mockSettings): | ||
assert mockSettings.d.k2.a == "a" | ||
assert mockSettings.d["k2"].a == "a" | ||
assert mockSettings.d["k2"]["a"] == "a" | ||
|
||
assert mockSettings.d.k1 == "v1" | ||
assert mockSettings.d["k1"] == "v1" | ||
|
||
assert mockSettings.foo == "bar" | ||
|