From 37a9c5dd5d5d693b177b263c40624b671baee045 Mon Sep 17 00:00:00 2001 From: David Medina Date: Sat, 18 Feb 2012 12:07:52 +0100 Subject: Support to resources-self-nested into collections --- pygithub3/tests/resources/test_core.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pygithub3/tests/resources/test_core.py') 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 """ -- cgit v1.2.3-59-g8ed1b