Skip to content

Commit b29af47

Browse files
Migrated TestRepoComment to tests/{unit/integration}
Migrated test_delete, test_str, test_update methods.
1 parent 6de69ed commit b29af47

File tree

5 files changed

+94
-43
lines changed

5 files changed

+94
-43
lines changed
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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", "Authorization": "token <AUTH_TOKEN>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA62YTW/jNhCG/4qhax3TthJnV0Cx7antbQ/bSy8GLdEWEUkUSMqGI+S/9x1SsiUv6o+wQBDYMufhyyFnNMM2klmUxK+L+etiMY0qXoooiXbS5s0mntXHaBptm6JYdz8YuSv5XurGLJ/ZaJQ6VEJHSRsVaicrMIZDQaFpls/zL/F8GvE9t1yvG11gXG5tbRLG/EMz89TGCJ2qyorKzlJVsoZ542/7X2PQdrpjEDbCgwtWLTuONwbMsAtBuS2LCwl+amdyMXirikIdQLkUfWsidrIkTzqKrHafpMCyZcrmAr7Dkj7IEdLYx0U5qxYbaOxaZsQx2BAtsoeFdXaQRfv/0TItauWAzcakWtZWqupxgSNr0JTe8Uq+88/RYG0AIWmPS3FWsBZ7nMXHzb1Zy2ot9zw9kmu0SIXcw9mfRF7Yg2iPNYXt3zgU5HppxZpnJYXhlhdGfEwjN73FIPdgiqi79/SPwzwTp13FhN+PNlfVpJAbzfVxslV6IhGzestTnNXJAWlkguM6+UPaP5vN5Pfvf+0pejHu7aTkauQ654+CcSyHSDf25CoC4QkAJL2JYxCH7FuG/108pQh1vlGaW3UraVwXOAK1bPiVzpIVvAwS7gAA5UqFedIBAJLGNOKuo3194Y5jWB8/VVNufMq7J2quoz0BWrlBnq+ECPLgCdKyPisjHKo0D8P2jJb5T263+S5IKtkDsynUJoiDFyVzkJaZnPv3kF2HqiMqMUZQLbbBUolxgloduN9OJkFOSLwELbY+SGfPYG3n0YJXu4bvwqgnCHadXtU7/n6ziLkeO2cKkFShablpwpPcmUNKfe2AeA9z6RlzhrqC5HqZc8MBg8LGuaAs5a264DqxQ4yO/f+ApXN6iabvt8uY23KJ0bJzTvZJv6OHeLfL+r3O4RxdOxB0JHoGa3+puc0pc2GqmmsRIrpDsHbDUWzNZrM2F9yV1aXQgRHsCUBxneaoGkN0tj0DVU/JravWtyQzQ/VeKJ4F+fYEAdBvY4hWTxjuf40+NEigAwyJpSyEsaoKy7FnypBdKSu3Mr2nY7kebiNQ+83IKhVTXhRTnForU4lzjFqbdhEFpwjzkCdgGbgG8J1KIXCkg7yuhWe0zHeamagLdQzOQgMMBbEW6G6yNbfoSpbzxfJpHj8t4h+Lr8nLl+Ql/gdjmjobjVk9zRdPy68/5oskXuKPxtSNyQeYfsgCv8fdEKTV7lzjE+4t8B93JT9dGgz6FLqKANuY/Gz429ks+Y9Llc4sLXBALyLp/jn3l++626aQmqtS1Kg9uuuZ0yrj+jiDpzP0dJlKzQyNNaOVyXcMfV0t41GVkaqmwn48r56n0YFbFMR4nw8f9tXJqZOkqblZ+9iPEqsbalXx5JxbBg8P8k2eG1qMIsmmN/OtYTfdYvWKZCy1Vt21U4VcgGuFWlTdbL2wF9yC+aYwcUaDIVFCP/Yr6RaWiS1vCrv2RTpWkqG7KFRNh0noEkuhCxC6GBt25P6k9VIpMfnP6NQrYQ9oSns9TsSwIOpWtFx9/AvM3BAivBMAAA==", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "x-github-media-type": "github.v3; param=full; format=json", "x-oauth-scopes": "admin:public_key, gist, repo, user", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "x-accepted-oauth-scopes": "repo", "etag": "W/\"d6468a3bb6f9fa9fe67a875449b39e6e\"", "cache-control": "private, max-age=60, s-maxage=60", "status": "200 OK", "x-ratelimit-remaining": "4983", "x-served-by": "d0b3c2c33a23690498aa8e70a435a259", "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": "97E45D32:2075:102C5689:56AC8A3C", "access-control-allow-credentials": "true", "last-modified": "Fri, 29 Jan 2016 01:32:32 GMT", "date": "Sat, 30 Jan 2016 10:02:37 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": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1454150761"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py"}, "recorded_at": "2016-01-30T10:02:37"}, {"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", "Authorization": "token <AUTH_TOKEN>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/comments/15779192"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA52UwZKbMAyGX4Vxr0kMJCGB2W4vfYT20kvGgCCegu2xBduUybtXBtrZZDtplxs2+j/9ki0PrLMNy9gZ0biMc2HkppZ47vJNoVtuwWjHnaxb0UvbuXjHp7/bjblwimhBoePR/nBIozRmKwK1zemW+Yr3iCSRh0fIkzgqj6IsodpVcZIW6a4M81wU4b5IKpFECaSHDz6zxDn/+lV6WbLs93LFOgeWZQNrdC0VVSnRtdAKxOLcqZrc+vDDdn+MwnjFRC9Q2Dvz06abm+KBhVZIVY/96fis/tR/3BKvtjPEgxltPOyupzn+xtTjFr4Jr3TT6Bci3Tu/Pcq/JeN/tGR1+paqXswh7cA1noGaSKVdfUOkwyXGRt1Al83hSZae5OhsLJQLzM1KsvaiyNUw3uoR2eWusNKg1GqJyRs98bSthZI/xVIe6R1hxqFbUOeoIz30figXACbhwI2VvSguvkUWCpA9tX0x9I5ATLwYoOn46oeTDkEinETZ+gGtROPgumJUh/RNZJnqmmbFGqlIMX0bgedptqZHgK4HLf/35aCEhQWBVJFA0sVhlKzDaL0Nv4Rptttl+/03iulM+c+YXJeXk59VwjyZ58/QAELQQlBpG9AQBJLeCXoQfCEBgsNgTdtCfXdP3DxTkhGA8MP7eId6Vr5TdP0F9+pPMeoFAAA=", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "x-github-media-type": "github.v3; param=full; format=json", "x-oauth-scopes": "admin:public_key, gist, repo, user", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "x-accepted-oauth-scopes": "", "etag": "W/\"3e93b14d1a1d238349b644b058e67ad4\"", "cache-control": "private, max-age=60, s-maxage=60", "status": "200 OK", "x-ratelimit-remaining": "4982", "x-served-by": "7f48e2f7761567e923121f17538d7a6d", "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": "97E45D32:2075:102C56BE:56AC8A3D", "access-control-allow-credentials": "true", "last-modified": "Sat, 30 Jan 2016 09:44:55 GMT", "date": "Sat, 30 Jan 2016 10:02:37 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": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1454150761"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/comments/15779192"}, "recorded_at": "2016-01-30T10:02:37"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Content-Length": "0", "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", "Authorization": "token <AUTH_TOKEN>"}, "method": "DELETE", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/comments/15779192"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"status": "204 No Content", "x-ratelimit-remaining": "4981", "x-github-media-type": "github.v3; param=full; format=json", "x-content-type-options": "nosniff", "content-security-policy": "default-src 'none'", "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", "x-github-request-id": "97E45D32:2075:102C56F4:56AC8A3D", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "vary": "Accept-Encoding", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-oauth-scopes": "admin:public_key, gist, repo, user", "x-served-by": "a6882e5cd2513376cb9481dbcd83f3a2", "access-control-allow-credentials": "true", "date": "Sat, 30 Jan 2016 10:02:37 GMT", "x-frame-options": "deny", "access-control-allow-origin": "*", "x-accepted-oauth-scopes": "", "x-xss-protection": "1; mode=block", "x-ratelimit-reset": "1454150761"}, "status": {"message": "No Content", "code": 204}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/comments/15779192"}, "recorded_at": "2016-01-30T10:02:37"}], "recorded_with": "betamax/0.5.0"}
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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", "Authorization": "token <AUTH_TOKEN>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA62YTW/jNhCG/4qhax3TthJnV0Cx7antbQ/bSy8GLdEWEUkUSMqGI+S/9x1SsiUv6o+wQBDYMufhyyFnNMM2klmUxK+L+etiMY0qXoooiXbS5s0mntXHaBptm6JYdz8YuSv5XurGLJ/ZaJQ6VEJHSRsVaicrMIZDQaFpls/zL/F8GvE9t1yvG11gXG5tbRLG/EMz89TGCJ2qyorKzlJVsoZ542/7X2PQdrpjEDbCgwtWLTuONwbMsAtBuS2LCwl+amdyMXirikIdQLkUfWsidrIkTzqKrHafpMCyZcrmAr7Dkj7IEdLYx0U5qxYbaOxaZsQx2BAtsoeFdXaQRfv/0TItauWAzcakWtZWqupxgSNr0JTe8Uq+88/RYG0AIWmPS3FWsBZ7nMXHzb1Zy2ot9zw9kmu0SIXcw9mfRF7Yg2iPNYXt3zgU5HppxZpnJYXhlhdGfEwjN73FIPdgiqi79/SPwzwTp13FhN+PNlfVpJAbzfVxslV6IhGzestTnNXJAWlkguM6+UPaP5vN5Pfvf+0pejHu7aTkauQ654+CcSyHSDf25CoC4QkAJL2JYxCH7FuG/108pQh1vlGaW3UraVwXOAK1bPiVzpIVvAwS7gAA5UqFedIBAJLGNOKuo3194Y5jWB8/VVNufMq7J2quoz0BWrlBnq+ECPLgCdKyPisjHKo0D8P2jJb5T263+S5IKtkDsynUJoiDFyVzkJaZnPv3kF2HqiMqMUZQLbbBUolxgloduN9OJkFOSLwELbY+SGfPYG3n0YJXu4bvwqgnCHadXtU7/n6ziLkeO2cKkFShablpwpPcmUNKfe2AeA9z6RlzhrqC5HqZc8MBg8LGuaAs5a264DqxQ4yO/f+ApXN6iabvt8uY23KJ0bJzTvZJv6OHeLfL+r3O4RxdOxB0JHoGa3+puc0pc2GqmmsRIrpDsHbDUWzNZrM2F9yV1aXQgRHsCUBxneaoGkN0tj0DVU/JravWtyQzQ/VeKJ4F+fYEAdBvY4hWTxjuf40+NEigAwyJpSyEsaoKy7FnypBdKSu3Mr2nY7kebiNQ+83IKhVTXhRTnForU4lzjFqbdhEFpwjzkCdgGbgG8J1KIXCkg7yuhWe0zHeamagLdQzOQgMMBbEW6G6yNbfoSpbzxfJpHj8t4h+Lr8nLl+Ql/gdjmjobjVk9zRdPy68/5oskXuKPxtSNyQeYfsgCv8fdEKTV7lzjE+4t8B93JT9dGgz6FLqKANuY/Gz429ks+Y9Llc4sLXBALyLp/jn3l++626aQmqtS1Kg9uuuZ0yrj+jiDpzP0dJlKzQyNNaOVyXcMfV0t41GVkaqmwn48r56n0YFbFMR4nw8f9tXJqZOkqblZ+9iPEqsbalXx5JxbBg8P8k2eG1qMIsmmN/OtYTfdYvWKZCy1Vt21U4VcgGuFWlTdbL2wF9yC+aYwcUaDIVFCP/Yr6RaWiS1vCrv2RTpWkqG7KFRNh0noEkuhCxC6GBt25P6k9VIpMfnP6NQrYQ9oSns9TsSwIOpWtFx9/AvM3BAivBMAAA==", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "x-github-media-type": "github.v3; param=full; format=json", "x-oauth-scopes": "admin:public_key, gist, repo, user", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "x-accepted-oauth-scopes": "repo", "etag": "W/\"d6468a3bb6f9fa9fe67a875449b39e6e\"", "cache-control": "private, max-age=60, s-maxage=60", "status": "200 OK", "x-ratelimit-remaining": "4976", "x-served-by": "2c18a09f3ac5e4dd1e004af7c5a94769", "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": "97E45D32:2076:A6A457C:56AC8BDA", "access-control-allow-credentials": "true", "last-modified": "Fri, 29 Jan 2016 01:32:32 GMT", "date": "Sat, 30 Jan 2016 10:09:30 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": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1454150761"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py"}, "recorded_at": "2016-01-30T10:09:30"}, {"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", "Authorization": "token <AUTH_TOKEN>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/comments/15779254"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA52UwY6bMBCGX2XlXkkMJJAEbbev0EN76SUyxoAlY1v2wDZFefeOgVab7CqtuBl7/m/+GXsYSe8UKUgLYH1BKbNy20ho+3LLTUedsMZTL5uODdL1Pt3T+XS3tReKEZ3Q4GmSHQ6nNNuTCEGdOt8y3/AekSTQ+CjKPE2qI6sqUe/rND/x076Ky5LxOON5zfIkF6fDp5BZwpJ/8ya9rEjx5zMivReOFCNRppEaq5TgO9ExAN72ukG3Ifywy45JnEaEDQyYuzM/b/qlKQHIjQaseupPTxf1l+HzDnmNWyABTHDjYXcDzdN3ph638F14bZQyr0i6d357lR8lo3+1aHVeS92s5qB2pAZagU3E0q6hIdLDGmOTbsTH5uEsq0DyeDdOVCvMLUq09qrR1Ti96gnZl547aUEavcbkjR55xjVMy19sLQ/1HjHT0K2oc9KhXgxhKFcAZuFIrZMD45fQIie4kAO2fTX0joBMuFiB0/E9DCdeggRxZlUXBrRmyotrRLAOGZpICt0rFRElNSrmtWXQzrM1/wTweeDn//45MCF3ggFWxAB1aZzkmzjZ7OJvSVzEhyJLf2BMb6t/xpSmupzDrCLm2b58VYJ58TQrnzrxTO0LkqYoED9DsvuQ5fijk+tvJkZlCZkFAAA=", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "x-github-media-type": "github.v3; param=full; format=json", "x-oauth-scopes": "admin:public_key, gist, repo, user", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "x-accepted-oauth-scopes": "", "etag": "W/\"74067056e6b50997c22e51512e096b1a\"", "cache-control": "private, max-age=60, s-maxage=60", "status": "200 OK", "x-ratelimit-remaining": "4975", "x-served-by": "13d09b732ebe76f892093130dc088652", "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": "97E45D32:2076:A6A45A1:56AC8BDA", "access-control-allow-credentials": "true", "last-modified": "Sat, 30 Jan 2016 10:07:52 GMT", "date": "Sat, 30 Jan 2016 10:09:30 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": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1454150761"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/comments/15779254"}, "recorded_at": "2016-01-30T10:09:30"}, {"request": {"body": {"string": "{\"body\": \"Updated by integration test\"}", "encoding": "utf-8"}, "headers": {"Content-Length": "39", "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", "Authorization": "token <AUTH_TOKEN>"}, "method": "POST", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/comments/15779254"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA52U246bMBCGXyVyb0nMIYGAttuX6N70JjJgYCQOlj2wpSjv3jGw1Sa7TSvubJj/m3/GHk+s1zVLWIWoTMK5UHAoAas+PWRdw7VUneEGykYMoHvjH/nyNziokVNEI1s03DtFUeyfjswhUFNfbpnveI9IgNw9yzT0vfws8lwWx8IP4yw+5m6aisw9ZWEhQi+UcfTFZgZc8+/fpYecJW9bh/VGapZMrO5KaKlKQNPIRiBmVd+W5NaGR8Hp7Lm+w8QgUOg788tHszbFArOuRap67k/PV/W34WtAvFKvEAtm9OFhdy3N8A+mHrfwQ3jR1XX3SqR757dH+Vky/kdLVpc1tOVmDmkn3mElqYlU2tU2BAxuMTbrJrpsBi+QW5Khs9Ey32BuVZK115ZcTfOtnpF9ajINCqFrt5i80ROv06Vo4ZfYyiO9Icw8dBvqnHWkl4Mdyg2ARThxpWEQ2WhbpGUmYaC2b4beEYiJo5I0HS92OOkQAOVF5I0d0ELURl4dRnWAbSJL2r6uHVZDS4plrQRWy2wtjwBdD9r+78tBCTMtBVJFAknnu164d7194H733MSNkpP/g2J6lf81Jk4C18akXT5e7KwS5kk9vyySXTrugB4IeglsBTuUBp+4en4ToPxp8z6IXiP/EXT9DZwi0Mm6BQAA", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "x-github-media-type": "github.v3; param=full; format=json", "x-oauth-scopes": "admin:public_key, gist, repo, user", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "x-accepted-oauth-scopes": "", "etag": "W/\"097226f80d654389c79697aa19133136\"", "cache-control": "private, max-age=60, s-maxage=60", "status": "200 OK", "x-ratelimit-remaining": "4974", "x-served-by": "cee4c0729c8e9147e7abcb45b9d69689", "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": "97E45D32:2076:A6A45B6:56AC8BDA", "access-control-allow-credentials": "true", "date": "Sat, 30 Jan 2016 10:09:30 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": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1454150761"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/comments/15779254"}, "recorded_at": "2016-01-30T10:09:30"}], "recorded_with": "betamax/0.5.0"}

tests/integration/test_repos_repo.py

+27
Original file line numberDiff line numberDiff line change
@@ -1135,3 +1135,30 @@ def test_test(self):
11351135
tested = hook.test()
11361136

11371137
assert tested
1138+
1139+
1140+
class TestRepoComment(helper.IntegrationHelper):
1141+
1142+
"""Integration tests for RepoComment object."""
1143+
1144+
def test_delete(self):
1145+
"""Test the ability to delete a repository comment."""
1146+
self.token_login()
1147+
cassette_name = self.cassette_name('delete')
1148+
with self.recorder.use_cassette(cassette_name):
1149+
repository = self.gh.repository('sigmavirus24', 'github3.py')
1150+
comment = repository.commit_comment(15779192)
1151+
deleted = comment.delete()
1152+
1153+
assert deleted
1154+
1155+
def test_update(self):
1156+
"""Test the ability to update a repository comment."""
1157+
self.token_login()
1158+
cassette_name = self.cassette_name('update')
1159+
with self.recorder.use_cassette(cassette_name):
1160+
repository = self.gh.repository('sigmavirus24', 'github3.py')
1161+
comment = repository.commit_comment(15779254)
1162+
updated = comment.update(body='Updated by integration test')
1163+
1164+
assert updated

tests/test_repos.py

-42
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,6 @@
55
from tests.utils import (BaseCase, load, mock)
66

77

8-
class TestRepoComment(BaseCase):
9-
def __init__(self, methodName='runTest'):
10-
super(TestRepoComment, self).__init__(methodName)
11-
self.comment = repos.comment.RepoComment(load('repo_comment'))
12-
self.api = ("https://api.github.com/repos/sigmavirus24/github3.py/"
13-
"comments/1380832")
14-
15-
def setUp(self):
16-
super(TestRepoComment, self).setUp()
17-
self.comment = repos.comment.RepoComment(self.comment.as_dict(),
18-
self.g)
19-
20-
def test_delete(self):
21-
self.response('', 204)
22-
self.delete(self.api)
23-
24-
self.assertRaises(github3.GitHubError, self.comment.delete)
25-
26-
self.not_called()
27-
self.login()
28-
29-
assert self.comment.delete()
30-
self.mock_assertions()
31-
32-
def test_repr(self):
33-
assert repr(self.comment).startswith('<Repository Comment')
34-
35-
def test_update(self):
36-
self.post(self.api)
37-
self.response('repo_comment', 200)
38-
self.conf = {'data': {'body': 'This is a comment body'}}
39-
40-
self.assertRaises(github3.GitHubError, self.comment.update, 'foo')
41-
42-
self.login()
43-
assert self.comment.update(None) is False
44-
self.not_called()
45-
46-
assert self.comment.update('This is a comment body')
47-
self.mock_assertions()
48-
49-
508
class TestRepoCommit(BaseCase):
519
def __init__(self, methodName='runTest'):
5210
super(TestRepoCommit, self).__init__(methodName)

0 commit comments

Comments
 (0)