diff options
author | 2012-02-18 12:07:52 +0100 | |
---|---|---|
committer | 2012-02-18 12:07:52 +0100 | |
commit | 37a9c5dd5d5d693b177b263c40624b671baee045 (patch) | |
tree | 7c146bdff5913389d58e6f07175fbcf55d3e25a3 /pygithub3/tests/resources/test_core.py | |
parent | Small refactor to building requests in services (diff) | |
download | python-github3-37a9c5dd5d5d693b177b263c40624b671baee045.tar.xz python-github3-37a9c5dd5d5d693b177b263c40624b671baee045.zip |
Support to resources-self-nested into collections
Diffstat (limited to 'pygithub3/tests/resources/test_core.py')
-rw-r--r-- | pygithub3/tests/resources/test_core.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pygithub3/tests/resources/test_core.py b/pygithub3/tests/resources/test_core.py index 1422667..9c05e2b 100644 --- a/pygithub3/tests/resources/test_core.py +++ b/pygithub3/tests/resources/test_core.py @@ -19,6 +19,8 @@ github_return = dict( ) github_return_nested = github_return.copy() github_return.update({'self_nested': github_return_nested}) +github_return.update({'self_nested_list': [github_return_nested] * 2}) +github_return.update({'self_nested_dict': dict(arg1=github_return_nested)}) class TestResourceMapping(TestCase): @@ -53,6 +55,11 @@ class TestResourceMapping(TestCase): self.assertIsInstance(self.r.list_collection[0], HasSimple) self.assertIsInstance(self.r.items_collections['arg1'], HasSimple) + def test_SELF_nested_in_collections(self): + self.assertIsInstance(self.r.self_nested_list[0], Nested) + self.assertIsInstance(self.r.self_nested_dict['arg1'], Nested) + + class TestRawResource(TestCase): """ Litle obvious :P """ |