From 2b9eb4787aa826c12635a0d682b118dad3ca5e18 Mon Sep 17 00:00:00 2001 From: Matt Chung Date: Sat, 7 Nov 2015 15:06:22 +0000 Subject: [PATCH 1/4] Initial commit of migrating test_git.py to unit/test_git.py In order to call self.instance.recurse(), we need to add an integration test. After, we can then remove the class TestTree completely --- tests/unit/test_git.py | 27 ++++++++ tests/unit/tree_example | 141 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 168 insertions(+) create mode 100644 tests/unit/test_git.py create mode 100644 tests/unit/tree_example diff --git a/tests/unit/test_git.py b/tests/unit/test_git.py new file mode 100644 index 000000000..67182df1e --- /dev/null +++ b/tests/unit/test_git.py @@ -0,0 +1,27 @@ +import github3 + +from .helper import (UnitHelper, create_example_data_helper, create_url_helper) + +get_example_data = create_example_data_helper('tree_example') +url_for = create_url_helper('https://api.github.com/repos/sigmavirus24/github3.py/' + 'git/trees/75b347329e3fc87ac78895ca1be58daff78872a1') + + +class TestTree(UnitHelper): + """Tree unit test""" + + described_class = github3.git.Tree + example_data = get_example_data() + + def test_repr(self): + """Assert Tree in in the repr.""" + assert isinstance(self.instance, github3.git.Tree) + assert repr(self.instance).startswith(' Date: Sat, 7 Nov 2015 16:13:28 +0000 Subject: [PATCH 2/4] Removed class Tree from test_git.py and migrated it to integration test --- tests/cassettes/Tree_recurse.json | 1 + tests/integration/test_git.py | 17 +++++++++++++++++ tests/test_git.py | 25 ------------------------- 3 files changed, 18 insertions(+), 25 deletions(-) create mode 100644 tests/cassettes/Tree_recurse.json create mode 100644 tests/integration/test_git.py diff --git a/tests/cassettes/Tree_recurse.json b/tests/cassettes/Tree_recurse.json new file mode 100644 index 000000000..d61440ae3 --- /dev/null +++ b/tests/cassettes/Tree_recurse.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0a2", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA62YT4/yNhDGvwrKtSwmsJTdSNXbntre3sPbSy/ISUxibRJHtgNio/3ufWznL1VhWfeCIHh+fjyecWbcBjwNou0+XO/DcBlUtGRBFGRc5028XdWXYBkcm6I4dH8onpX0xGWjNs9kNkqcKyaDqA0KkfEKjOlQUMw0m+f1y3a9DOiJaioPjSwwLte6VhEh7qFaOWqjmExEpVmlV4koSUOc8bfTL1vQMtkxDDbAgytWzTuOMwZMkStBuS6LKwluamtyNfgoikKcQbkWfW8iMlgaT1oKr7IvUmDZEqFzBt9hSR/GEVzpx0VZqxYbqPSBp4ajsCGSpQ8L6+wgy+z/R0skq4UFNrFKJK81F9XjAmfWoAmZ0Yq/06/RYK0AMdIel2KtYM1OiMXHzZ1ZS2rJTzS5GNdIljB+grO/iLyyB1FfapO2fyEojOu5ZgealiYNj7RQ7GMZ2Ok1BtkHS2TdZ6N/nuYpG3YVE36/6FxUi4LHksrL4ijkgiNn5ZEmiNXFGcfIAuG6+J3rP5p48dv3P08mezHubVByM3Ot82fJOJdjSHf25CYC6QkAJL2xixfH2LcEn10+JUh1GgtJtbh3aNwWOAO1ZPrTxJJmtPQSbgEA5UL4edICAOJKNexToX174ZajSJ8/VVPG7sj7TNbcRjsCtFKFc75izMuDA6Ql/amMdKiS3A/bM1rivtndppmXVGMPTFyI2IuDFyWxkJaonLr3kD74qjNUw5hBJTt6SzWMAaql535bmQYyIPES1Nh6L509g7SdRwtaZQ3N/KgDBLtuXtUZfb9bxNzOnZECpKnQJI8b/0Nu5BilrnZAvvu5dMSMUFuQ3C5z7jhgUthYF5Qlv1cX3CZ2iFnY/w9YE6fXaPP7fhlzX65htGQ8k92h39F9vNud+r3O6RxdO+AVEj2DtD/VVOfm5MJUNZXMR3SHIG1MUWytVqs2Z9SW1SWTnhnsCEBRmeSoGn10tj0DVU9Jta3Wj0Zmiuq9EDT18u0AAdBto49WR5juf40+1EugBUyJJS+Y0qLyO2NHypRdCc2PPPlMx3I73Wag9pviVcKWtCiWiFrNE444Rq1tdhEFJ/PzkCNgGbgGcJ1KwRDSXl6XzDFa4jrNRDI0IumBajQQm3W4eVpvn8Ltj/A12r1Eu+3fWElTp7Mxu6cwfFrvf6xfos0+2oZmTN2ofIIZhqyj3T56thicgF0I4huuGPCJa41/9feTlsLcGsBQqXw0/HU0i/7j/qMzSwrE0lXQf37O0/Vr6b4ppOaiZDXKhO4mZVjltr6s4OkU7VcqErVCD0zMyvg7hr7uX19nBUEimgr78Rz+vAzOVKN2xat3+rAvJIamz0xN1cGlaRBp2ZiuEk/GY2Dy8Mzf+Nh7YpSRrHoz18V104W7Hc5NLqXobogqpC1uAGpWdbP1wnZYg+vfIms0GRJE5s9+Jd3CUnakTaEPrp7GSlI0AoWosZSK6TM6wZ5scdMqpNO22X38A7CV0ykxEwAA", "encoding": "utf-8"}, "headers": {"vary": "Accept", "x-github-media-type": "github.v3; param=full; format=json", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "W/\"87634f23b0e88ce76f4b914d98b73a6e\"", "cache-control": "public, max-age=60, s-maxage=60", "status": "200 OK", "x-ratelimit-remaining": "50", "x-served-by": "2d7a5e35115884240089368322196939", "access-control-expose-headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "transfer-encoding": "chunked", "x-github-request-id": "D56988B9:94AF:14509ED0:563E2297", "access-control-allow-credentials": "true", "last-modified": "Sat, 07 Nov 2015 08:27:31 GMT", "date": "Sat, 07 Nov 2015 16:11:03 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "content-encoding": "gzip", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "60", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1446914388"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py"}, "recorded_at": "2015-11-07T16:11:03"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0a2", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/git/trees/75b347329e3fc87ac78895ca1be58daff78872a1"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA62X3W7jOAyF3yXXg0YUqb++ymBRUBSVGps2QewM0B303ZeedhrPnYNxriwYyvFn6pDHP3fjM+8edylUpIS+KHbJiSXlXIIwVA25ce+2Tp5h9213vRxtw/M0ncfH/Z7Pw8NhmJ6v9UFOL/uLnk/jfhwOL/xjuFxHT/uPu/hwfpsv99NFddzfoTdv2D1+/7k78/Rsyk9Pw+swPT3ZH9rTvJya3d2Bc5HI1tPbeV7X46na6gOOanbKLoUcRF0UL1oopCYxeZEQVUMJ0ad5w/CfbacEf805P8G4Xy39/u0LcH6l69msLtnKFSGnggkFpEjRyj02ZOoSCgNz/2IDCFi2olsrvqS7Ts/jej4PtYeYAibwPov3tWgJyZML5HsPOUbtKPmLDyFthbdae4HXVE4Xnk6XOxjNaOKTua2jdxVVE2tIDKQ9JGoEjkMKoXwxehfcRiVcrb1g1B/6Ot3BB0gVC7QmpIwMZrkisRApZUBBO6WdRWf7fvovB78R32rtBd9hGO/BI02VEweJ0Dv17kRihSLUXUNoTKWhmBG/8Aok3AhvtfYfeNN6/4Hm0Bq7HEGyj1SDFTJgBGsuEBRzsWo269C/axcx543gVmv/CTfPotX9s7WqvrkOLtRQO2DWWEvzngKkGhzWhK1AvPWXnMNWDWa1+AJwGMer3mO+6DyHXjBa2QCL79F858RHheAbi7hKKS0GRHK0FSCsFV8AHvXA8ra+gi40agUR54NIWHP3diBdwApJoDnJmYjTrYKWA2ijE7pae8E3J5bjHQX0CckKSL0k4lY6tRpsXLCCFs69i43G4n1bTHgIWwGuFl8Avp6moQ/C03B6vYOzoQMyKxL6qqpcSomYJLVU/RzPeqIY7bDepkTMcaM6rtZeYJ4uhzvozGQESUuE2FoDrt27lEuxarpoKYZ9zZDzLccAmSs3wlstvsA7s/zLBx3tdX9mbEfOfrb+zNi/gvnvjG1cudVkPcV1koxI0VK2DXhBZIsv0BKFVucZv8kHxGq9JdL1eI/xKnIlaKVIVtHITatVKmR2LlUUO5OSycHCeN7HrUq2WnzB9+vja33jlFCTfewVKNULtTmUuWKQzneKhbtNeRsF0d9Ge8llq9y5WnzBdx31nlidSXMskMXFaOnZeofDaCO99mznspkXe7XrW0MBQAx/fT4/PvxWi7//Y4a6XF+tX2rbPXY+jvr+P9z5wvOXDwAA", "encoding": "utf-8"}, "headers": {"vary": "Accept", "x-github-media-type": "github.v3; param=full; format=json", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "W/\"c437e45ae4910fcfbc7a3b8c141ea5e3\"", "cache-control": "public, max-age=60, s-maxage=60", "status": "200 OK", "x-ratelimit-remaining": "49", "x-served-by": "07ff1c8a09e44b62e277fae50a1b1dc4", "access-control-expose-headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "transfer-encoding": "chunked", "x-github-request-id": "D56988B9:94AF:14509F1B:563E2297", "access-control-allow-credentials": "true", "last-modified": "Sat, 07 Nov 2015 08:27:31 GMT", "date": "Sat, 07 Nov 2015 16:11:03 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "content-encoding": "gzip", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "60", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1446914388"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/trees/75b347329e3fc87ac78895ca1be58daff78872a1"}, "recorded_at": "2015-11-07T16:11:03"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0a2", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/git/trees/75b347329e3fc87ac78895ca1be58daff78872a1?recursive=1"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA62Y224bRwyG30XXQTQ8zIF5iRboZVEYc+DYQm3LkFZGnSDvXm6cWBsgcGfR1Y20EFa/vuWQ/Mkvu/Nd3n3aRV+II6Eo9ZpirjEl8TVDUZ9a7t2uI2bYfdhdTvd2w900PZ0/7ff56fDx9jDdXcrHenzYn/TpeN6fD7cP+flwupyR96/f0senl/njfjqpnvcr9OYbdp/+/LJ7ytOdKd/cHB4P082N/aD9m4djs2934Fxgtuvp5Wm+LvfHYlevcFyS0+yiT76qCxWrCvvYaohYqw+qXnzAON9w+Gy3c4T/zTn/g/N+WPrrhzfA+ZGOs1lckoUrQIpCkSpUqaIl99Aoc69eMuTc39gAPMlWdKPiS7rLdHce50Mo3YfoKQJiqohFVHxEdp6xd59C0E41vfERxK3whrUXeE3r8ZSn42kFoyVaxWjZ1gldIdWY1ccMrN1Hbgwu++i9vDGi826jEA5rLxj1WR+nFXxAXEigtcqaKYOlnNQgzMoJqJKd0p6rzun7Pf+Sx434hrUXfLeH8xo81lhyzL4G6J17d7WGAlK5u0bQMkujaon4hicQaSO8Ye2f8Kbx/ANNvrXsUoCaMHDxFkhPAay4gFdKYtFsVqF/xC5QShvBDWv/DDf3ouH62VpRbK6D88WXDpQ0FGmI7CEW76hEagLhWl9S8lsVmGHxBeDhfL7omuQLDrPvQsHCBiTYg+WdqxgUPLZcqysc46JBRMdbAcKo+ALwXm9zfRmPoPONmxDRfBCZSupoB9J5KhArNFdTYs7xGkHzAbzRCR3WXvDNjuV+RQAxElsAuUvk3KRzK97aRVZQyan3aq1RENuiw4PfCnBYfAH4eJwO/VDzdDg+ruBs5IAtFZmwqGoWkUCxxhYLzvasRw7BDuu1S4QUNorjsPYC83i6XUFnScYQVQKE1hrk0tHFJGLRdMFcTMaSIKWrjwG2rNwIb1h8gfeU69/5Vs/2uL97bMfOXnb93WN/M+Y/PLZxpVai1RTXuSYiDuayrcFXomz2BVpk38rc4zcZIIb1foG0//3lj99ScPM0M8LWXMEK1vcsIhWSRvWWfcXlzmIO1Iqc024mYCu2Yb332Pbr56R54JMmYp66u6zoY7BeEaln8RiyzYFo1Ybnx/bq04Twf4fzdU4alv4P5Gc9na3srJkOyZkVRUYBSaVat6AgHc3HsbkdyeZxzLsRXt0p4Fbme1j6XeqWJ50OD3qe8sPTipLks6vWWBxXbHNd6lZj0TtzPeiFi1Upc+fcr2PxXLE2ivew9vvkFxu11nUZQyrJm9NT65tdlag0hLkyiReXuViPNTt7dQuAspUbGtZ+F/rwOOnpOa+xEGzFV1yC3qqCrXG4mhG0rQErSYy5YQuVW796wEB+o0APS7/LfNJb/WfN0Q6JbXmFvSlBQYyWyamX2K2KSSkBXMRY9FrJrDdvdrRHtd8lnhP68/FxldOnhIRmg82/h5qs3dYcRQo3aNVcsVj/ghTqW/kGpK0MlM1NY9rvQl+mw/1hWuH9gy25OCl2a8VoNYyiC8GlzpBysQ7dpdkwztfRG2Crzd6w9K+I1/dmZHWS5hEcJfd5SLUDbhar2nKPNHZ759Dh6o7DViuGYeUl6OV+TX0qlAuDOY+atGrITYt5Yp+ys25E1dy/HWcHixEHMWxljofFF3zf1tzjI2r1VnpqModhRpLbvP5yYpAOzWRYOG2fYkN3wLfMDJJkK5MxLL7gu5zNR43zJdYUBFK17LM9pU1pjoItT4odVE7Npp5e7PP1cALQZh1mWPzrXza6nC6PNplq233q1kL167/hoORpARkAAA==", "encoding": "utf-8"}, "headers": {"vary": "Accept", "x-github-media-type": "github.v3; param=full; format=json", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "W/\"c055cd9cc7a8565302960f5afbc930fd\"", "cache-control": "public, max-age=60, s-maxage=60", "status": "200 OK", "x-ratelimit-remaining": "48", "x-served-by": "dc1ce2bfb41810a06c705e83b388572d", "access-control-expose-headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "transfer-encoding": "chunked", "x-github-request-id": "D56988B9:94AF:14509F44:563E2297", "access-control-allow-credentials": "true", "last-modified": "Sat, 07 Nov 2015 08:27:31 GMT", "date": "Sat, 07 Nov 2015 16:11:03 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "content-encoding": "gzip", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "60", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1446914388"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/trees/75b347329e3fc87ac78895ca1be58daff78872a1?recursive=1"}, "recorded_at": "2015-11-07T16:11:04"}], "recorded_with": "betamax/0.5.0"} \ No newline at end of file diff --git a/tests/integration/test_git.py b/tests/integration/test_git.py new file mode 100644 index 000000000..bdc462120 --- /dev/null +++ b/tests/integration/test_git.py @@ -0,0 +1,17 @@ +"""Integration tests for Tree.""" +import github3 +from .helper import IntegrationHelper + + +class TestTree(IntegrationHelper): + + """Integration tests for methods on the Test class.""" + + def test_recurse(self): + """Test recurse on tree""" + cassette_name = self.cassette_name('recurse') + with self.recorder.use_cassette(cassette_name): + repository = self.gh.repository('sigmavirus24', 'github3.py') + t = repository.tree('75b347329e3fc87ac78895ca1be58daff78872a1').recurse() + assert isinstance(t.tree[0], github3.git.Hash) + assert repr(t.tree[0]).startswith(' Date: Sat, 7 Nov 2015 23:28:12 +0000 Subject: [PATCH 3/4] Removed 'u' from test, which is causing failure in Python 3.2 --- tests/unit/test_git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_git.py b/tests/unit/test_git.py index 67182df1e..cfe0d41a9 100644 --- a/tests/unit/test_git.py +++ b/tests/unit/test_git.py @@ -23,5 +23,5 @@ def test_recurse(self): self.instance.recurse() self.session.get.assert_called_once_with( url_for(), - params={u'recursive': u'1'} + params={'recursive': '1'} ) From 21590e8bf17b60cbd7a60e1b3cdfc63e1eb3b998 Mon Sep 17 00:00:00 2001 From: Matt Chung Date: Sun, 8 Nov 2015 08:25:43 +0000 Subject: [PATCH 4/4] Updated tree_example with octocat/Hello-World --- tests/unit/test_git.py | 4 +- tests/unit/tree_example | 167 +++++++--------------------------------- 2 files changed, 30 insertions(+), 141 deletions(-) diff --git a/tests/unit/test_git.py b/tests/unit/test_git.py index cfe0d41a9..afe3d9414 100644 --- a/tests/unit/test_git.py +++ b/tests/unit/test_git.py @@ -3,8 +3,8 @@ from .helper import (UnitHelper, create_example_data_helper, create_url_helper) get_example_data = create_example_data_helper('tree_example') -url_for = create_url_helper('https://api.github.com/repos/sigmavirus24/github3.py/' - 'git/trees/75b347329e3fc87ac78895ca1be58daff78872a1') +url_for = create_url_helper('https://api.github.com/repos/octocat/Hello-World/' + 'trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312') class TestTree(UnitHelper): diff --git a/tests/unit/tree_example b/tests/unit/tree_example index 74e54d88e..533a13a02 100644 --- a/tests/unit/tree_example +++ b/tests/unit/tree_example @@ -1,141 +1,30 @@ { - "sha": "75b347329e3fc87ac78895ca1be58daff78872a1", - "tree": [ - { - "mode": "100644", - "path": "__init__.py", - "sha": "4b80ea07585ce06c2ce9457dc672cc56ee595627", - "size": 471, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/4b80ea07585ce06c2ce9457dc672cc56ee595627" - }, - { - "mode": "100644", - "path": "api.py", - "sha": "48878ac761879373c1c9c9ebaf6d3a4fc59a1aaf", - "size": 11539, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/48878ac761879373c1c9c9ebaf6d3a4fc59a1aaf" - }, - { - "mode": "100644", - "path": "auths.py", - "sha": "21bf5675371228c22b9e957240542ff5866ef3c8", - "size": 3179, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/21bf5675371228c22b9e957240542ff5866ef3c8" - }, - { - "mode": "100644", - "path": "decorators.py", - "sha": "95cc275caf320b3ee7ae57a14ef574d410a57559", - "size": 2050, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/95cc275caf320b3ee7ae57a14ef574d410a57559" - }, - { - "mode": "100644", - "path": "events.py", - "sha": "134b391ddc4ea3a1c569c6944e4813c34fcface4", - "size": 4852, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/134b391ddc4ea3a1c569c6944e4813c34fcface4" - }, - { - "mode": "100644", - "path": "gists.py", - "sha": "4e7ba7a5c61ff4ff0cc6b19c4f0d31da49d3cfc5", - "size": 9173, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/4e7ba7a5c61ff4ff0cc6b19c4f0d31da49d3cfc5" - }, - { - "mode": "100644", - "path": "git.py", - "sha": "1e85dda0861c8264b591d53613a415e389c56dee", - "size": 6388, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/1e85dda0861c8264b591d53613a415e389c56dee" - }, - { - "mode": "100644", - "path": "github.py", - "sha": "ddbe2d0f105b5bf138e6b9d224517b503b73d916", - "size": 38859, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/ddbe2d0f105b5bf138e6b9d224517b503b73d916" - }, - { - "mode": "100644", - "path": "issues.py", - "sha": "1602a5f936d531392f64e40c26e152dacc0b477f", - "size": 17049, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/1602a5f936d531392f64e40c26e152dacc0b477f" - }, - { - "mode": "100644", - "path": "legacy.py", - "sha": "05d4d9333c56d43b8f26de053b17c1d0c8844a76", - "size": 7584, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/05d4d9333c56d43b8f26de053b17c1d0c8844a76" - }, - { - "mode": "100644", - "path": "models.py", - "sha": "2734a5f4f974ad9f4db5c27ae1e9a8ffc371922d", - "size": 11154, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/2734a5f4f974ad9f4db5c27ae1e9a8ffc371922d" - }, - { - "mode": "100644", - "path": "notifications.py", - "sha": "d30142d0432beeea999637c7d7b29562f7466c0b", - "size": 4686, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/d30142d0432beeea999637c7d7b29562f7466c0b" - }, - { - "mode": "100644", - "path": "orgs.py", - "sha": "0b4417e9616ddd1abf2078994db06586a2b81888", - "size": 14477, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/0b4417e9616ddd1abf2078994db06586a2b81888" - }, - { - "mode": "040000", - "path": "packages", - "sha": "6168db7e150f4c83346ce9e48c33aa571d745db4", - "type": "tree", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/trees/6168db7e150f4c83346ce9e48c33aa571d745db4" - }, - { - "mode": "100644", - "path": "pulls.py", - "sha": "b3ab41d99c8ece6adeb65858a007b3c956c8401d", - "size": 12267, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/b3ab41d99c8ece6adeb65858a007b3c956c8401d" - }, - { - "mode": "100644", - "path": "repos.py", - "sha": "c5b7fc8919b2c4d569c09deb02f469af53670462", - "size": 69890, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/c5b7fc8919b2c4d569c09deb02f469af53670462" - }, - { - "mode": "100644", - "path": "users.py", - "sha": "84e86918c0665596c0036b50bf8e48de96fbbf8b", - "size": 11335, - "type": "blob", - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs/84e86918c0665596c0036b50bf8e48de96fbbf8b" - } - ], - "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/trees/75b347329e3fc87ac78895ca1be58daff78872a1" + "sha": "9fb037999f264ba9a7fc6274d15fa3ae2ab98312", + "url": "https://api.github.com/repos/octocat/Hello-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312", + "tree": [ + { + "path": "file.rb", + "mode": "100644", + "type": "blob", + "size": 30, + "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132" + }, + { + "path": "subdir", + "mode": "040000", + "type": "tree", + "sha": "f484d249c660418515fb01c2b9662073663c242e", + "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/f484d249c660418515fb01c2b9662073663c242e" + }, + { + "path": "exec_file", + "mode": "100755", + "type": "blob", + "size": 75, + "sha": "45b983be36b73c0788dc9cbcb76cbb80fc7bb057", + "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057" + } + ], + "truncated": false }