-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added additional tests to test the JSON and YAML dumping features.
Updated the project features documentation to include tested and functioning examples based on the latest core design.
- Loading branch information
1 parent
079eca5
commit 94ab5d2
Showing
2 changed files
with
18 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from reflective import Reflective | ||
|
||
|
||
def test_json(): | ||
r = Reflective({'key': 'value'}) | ||
|
||
assert r().to_json(flat=True) == '{"key": "value"}' | ||
assert r().json == '{"key": "value"}' | ||
|
||
|
||
def test_yaml(): | ||
r = Reflective({'key': 'value'}) | ||
|
||
assert r().to_yaml() == 'key: value\n' | ||
assert r().yaml == 'key: value\n' |