From 63855409b915247cf99fa424af58adc6c74af0c6 Mon Sep 17 00:00:00 2001 From: Florent Clarret Date: Fri, 1 May 2020 04:01:09 +0200 Subject: [PATCH] feature: get the project column by id (#1466) Add a method to fetch a project column by id. Fixes #1057 --- github/MainClass.py | 15 +++ github/ProjectColumn.py | 1 - tests/ProjectColumn.py | 91 +++++++++++++++++++ tests/ReplayData/ProjectColumn.setUp.txt | 11 +++ .../ProjectColumn.testCreateCard.txt | 11 +++ .../ProjectColumn.testGetAllCards.txt | 22 +++++ .../ProjectColumn.testGetArchivedCards.txt | 22 +++++ .../ReplayData/ProjectColumn.testGetCards.txt | 22 +++++ .../ProjectColumn.testGetNotArchivedCards.txt | 22 +++++ .../ProjectColumn.testGetProjectColumn.txt | 11 +++ 10 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 tests/ProjectColumn.py create mode 100644 tests/ReplayData/ProjectColumn.setUp.txt create mode 100644 tests/ReplayData/ProjectColumn.testCreateCard.txt create mode 100644 tests/ReplayData/ProjectColumn.testGetAllCards.txt create mode 100644 tests/ReplayData/ProjectColumn.testGetArchivedCards.txt create mode 100644 tests/ReplayData/ProjectColumn.testGetCards.txt create mode 100644 tests/ReplayData/ProjectColumn.testGetNotArchivedCards.txt create mode 100644 tests/ReplayData/ProjectColumn.testGetProjectColumn.txt diff --git a/github/MainClass.py b/github/MainClass.py index 3c643958..4602ce7a 100644 --- a/github/MainClass.py +++ b/github/MainClass.py @@ -362,6 +362,21 @@ class Github(object): ) return github.Project.Project(self.__requester, headers, data, completed=True) + def get_project_column(self, id): + """ + :calls: `GET /projects/columns/:column_id `_ + :rtype: :class:`github.ProjectColumn.ProjectColumn` + :param id: integer + """ + headers, data = self.__requester.requestJsonAndCheck( + "GET", + "/projects/columns/%d" % id, + headers={"Accept": Consts.mediaTypeProjectsPreview}, + ) + return github.ProjectColumn.ProjectColumn( + self.__requester, headers, data, completed=True + ) + def get_gist(self, id): """ :calls: `GET /gists/:id `_ diff --git a/github/ProjectColumn.py b/github/ProjectColumn.py index 604d7e6f..9b6d436e 100644 --- a/github/ProjectColumn.py +++ b/github/ProjectColumn.py @@ -128,7 +128,6 @@ class ProjectColumn(github.GithubObject.CompletableGithubObject): :param content_type: string :rtype :class:`github.ProjectCard.ProjectCard`: """ - post_parameters = {} if isinstance(note, str): assert content_id is github.GithubObject.NotSet, content_id assert content_type is github.GithubObject.NotSet, content_type diff --git a/tests/ProjectColumn.py b/tests/ProjectColumn.py new file mode 100644 index 00000000..8be10f53 --- /dev/null +++ b/tests/ProjectColumn.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- + +# ########################## Copyrights and license ############################ +# # +# This file is part of PyGithub. # +# http://pygithub.github.io/PyGithub/v1/index.html # +# # +# PyGithub is free software: you can redistribute it and/or modify it under # +# the terms of the GNU Lesser General Public License as published by the Free # +# Software Foundation, either version 3 of the License, or (at your option) # +# any later version. # +# # +# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # +# details. # +# # +# You should have received a copy of the GNU Lesser General Public License # +# along with PyGithub. If not, see . # +# # +# ############################################################################## + +import datetime + +from . import Framework + + +class ProjectColumn(Framework.TestCase): + def setUp(self): + super().setUp() + self.project_column = self.g.get_project_column(8700460) + + def testGetProjectColumn(self): + self.assertEqual(self.project_column.id, 8700460) + self.assertEqual(self.project_column.name, "c1") + self.assertEqual( + self.project_column.cards_url, + "https://api.github.com/projects/columns/8700460/cards", + ) + self.assertEqual( + self.project_column.node_id, "MDEzOlByb2plY3RDb2x1bW44NzAwNDYw" + ) + self.assertEqual( + self.project_column.project_url, "https://api.github.com/projects/4294766" + ) + self.assertEqual( + self.project_column.url, "https://api.github.com/projects/columns/8700460" + ) + self.assertEqual( + self.project_column.created_at, datetime.datetime(2020, 4, 13, 20, 29, 53) + ) + self.assertEqual( + self.project_column.updated_at, datetime.datetime(2020, 4, 14, 18, 9, 38) + ) + + def testGetAllCards(self): + cards = self.project_column.get_cards(archived_state="all") + self.assertEqual(cards.totalCount, 3) + self.assertEqual(cards[0].id, 36285184) + self.assertEqual(cards[0].note, "Note3") + self.assertEqual(cards[1].id, 36281526) + self.assertEqual(cards[1].note, "Note2") + self.assertEqual(cards[2].id, 36281516) + self.assertEqual(cards[2].note, "Note1") + + def testGetArchivedCards(self): + cards = self.project_column.get_cards(archived_state="archived") + self.assertEqual(cards.totalCount, 1) + self.assertEqual(cards[0].id, 36281516) + self.assertEqual(cards[0].note, "Note1") + + def testGetNotArchivedCards(self): + cards = self.project_column.get_cards(archived_state="not_archived") + self.assertEqual(cards.totalCount, 2) + self.assertEqual(cards[0].id, 36285184) + self.assertEqual(cards[0].note, "Note3") + self.assertEqual(cards[1].id, 36281526) + self.assertEqual(cards[1].note, "Note2") + + def testGetCards(self): + cards = self.project_column.get_cards() + self.assertEqual(cards.totalCount, 2) + self.assertEqual(cards[0].id, 36285184) + self.assertEqual(cards[0].note, "Note3") + self.assertEqual(cards[1].id, 36281526) + self.assertEqual(cards[1].note, "Note2") + + def testCreateCard(self): + new_card = self.project_column.create_card(note="NewCard") + self.assertEqual(new_card.id, 36290228) + self.assertEqual(new_card.note, "NewCard") diff --git a/tests/ReplayData/ProjectColumn.setUp.txt b/tests/ReplayData/ProjectColumn.setUp.txt new file mode 100644 index 00000000..4bd64dbc --- /dev/null +++ b/tests/ReplayData/ProjectColumn.setUp.txt @@ -0,0 +1,11 @@ +https +GET +api.github.com +None +/projects/columns/8700460 +{'Accept': 'application/vnd.github.inertia-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Tue, 14 Apr 2020 18:17:57 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4971'), ('X-RateLimit-Reset', '1586891696'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"71d35582bd4b20a516cb5f77785e78f7"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.inertia-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'E8EE:6E5A:25E489C:2CBBC06:5E95FE55')] +{"url":"https://api.github.com/projects/columns/8700460","project_url":"https://api.github.com/projects/4294766","cards_url":"https://api.github.com/projects/columns/8700460/cards","id":8700460,"node_id":"MDEzOlByb2plY3RDb2x1bW44NzAwNDYw","name":"c1","created_at":"2020-04-13T20:29:53Z","updated_at":"2020-04-14T18:09:38Z"} + diff --git a/tests/ReplayData/ProjectColumn.testCreateCard.txt b/tests/ReplayData/ProjectColumn.testCreateCard.txt new file mode 100644 index 00000000..949ea2d7 --- /dev/null +++ b/tests/ReplayData/ProjectColumn.testCreateCard.txt @@ -0,0 +1,11 @@ +https +POST +api.github.com +None +/projects/columns/8700460/cards +{'Accept': 'application/vnd.github.inertia-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"note": "NewCard"} +201 +[('Date', 'Tue, 14 Apr 2020 18:17:57 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '1380'), ('Server', 'GitHub.com'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4970'), ('X-RateLimit-Reset', '1586891695'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"2bca70b58ac201ff69ebf718be34bbe2"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('Location', 'https://api.github.com/projects/columns/cards/36290228'), ('X-GitHub-Media-Type', 'github.inertia-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', 'E8F0:6E59:1E24A47:2387851:5E95FE55')] +{"url":"https://api.github.com/projects/columns/cards/36290228","project_url":"https://api.github.com/projects/4294766","id":36290228,"node_id":"MDExOlByb2plY3RDYXJkMzYyOTAyMjg=","note":"NewCard","archived":false,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T18:17:57Z","updated_at":"2020-04-14T18:17:57Z","column_url":"https://api.github.com/projects/columns/8700460"} + diff --git a/tests/ReplayData/ProjectColumn.testGetAllCards.txt b/tests/ReplayData/ProjectColumn.testGetAllCards.txt new file mode 100644 index 00000000..a3f4145f --- /dev/null +++ b/tests/ReplayData/ProjectColumn.testGetAllCards.txt @@ -0,0 +1,22 @@ +https +GET +api.github.com +None +/projects/columns/8700460/cards?archived_state=all&per_page=1 +{'Accept': 'application/vnd.github.inertia-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Tue, 14 Apr 2020 18:14:25 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4940'), ('X-RateLimit-Reset', '1586888091'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"c3932f4fc4f085b929f97a755d4bc619"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.inertia-preview; format=json'), ('Link', '; rel="next", ; rel="last"'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'E7C2:2D644:26F8AC2:2DEE2FC:5E95FD81')] +[{"url":"https://api.github.com/projects/columns/cards/36285184","project_url":"https://api.github.com/projects/4294766","id":36285184,"node_id":"MDExOlByb2plY3RDYXJkMzYyODUxODQ=","note":"Note3","archived":false,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:57:26Z","updated_at":"2020-04-14T16:57:26Z","column_url":"https://api.github.com/projects/columns/8700460"}] + +https +GET +api.github.com +None +/projects/columns/8700460/cards?archived_state=all +{'Accept': 'application/vnd.github.inertia-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Tue, 14 Apr 2020 18:14:26 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4939'), ('X-RateLimit-Reset', '1586888092'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"bcff97ef456baf6e3faceebd24c0b6f0"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.inertia-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'E7C4:19719:159936D:1965777:5E95FD82')] +[{"url":"https://api.github.com/projects/columns/cards/36285184","project_url":"https://api.github.com/projects/4294766","id":36285184,"node_id":"MDExOlByb2plY3RDYXJkMzYyODUxODQ=","note":"Note3","archived":false,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:57:26Z","updated_at":"2020-04-14T16:57:26Z","column_url":"https://api.github.com/projects/columns/8700460"},{"url":"https://api.github.com/projects/columns/cards/36281526","project_url":"https://api.github.com/projects/4294766","id":36281526,"node_id":"MDExOlByb2plY3RDYXJkMzYyODE1MjY=","note":"Note2","archived":false,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:00:37Z","updated_at":"2020-04-14T16:00:37Z","column_url":"https://api.github.com/projects/columns/8700460"},{"url":"https://api.github.com/projects/columns/cards/36281516","project_url":"https://api.github.com/projects/4294766","id":36281516,"node_id":"MDExOlByb2plY3RDYXJkMzYyODE1MTY=","note":"Note1","archived":true,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:00:32Z","updated_at":"2020-04-14T16:57:32Z","column_url":"https://api.github.com/projects/columns/8700460"}] + diff --git a/tests/ReplayData/ProjectColumn.testGetArchivedCards.txt b/tests/ReplayData/ProjectColumn.testGetArchivedCards.txt new file mode 100644 index 00000000..e613e9a4 --- /dev/null +++ b/tests/ReplayData/ProjectColumn.testGetArchivedCards.txt @@ -0,0 +1,22 @@ +https +GET +api.github.com +None +/projects/columns/8700460/cards?archived_state=archived&per_page=1 +{'Accept': 'application/vnd.github.inertia-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Tue, 14 Apr 2020 18:14:56 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4998'), ('X-RateLimit-Reset', '1586891695'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"cc21f8c4409a7da6edaceac3de3cd1db"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.inertia-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'E7CC:42898:2379A2:2982BE:5E95FDA0')] +[{"url":"https://api.github.com/projects/columns/cards/36281516","project_url":"https://api.github.com/projects/4294766","id":36281516,"node_id":"MDExOlByb2plY3RDYXJkMzYyODE1MTY=","note":"Note1","archived":true,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:00:32Z","updated_at":"2020-04-14T16:57:32Z","column_url":"https://api.github.com/projects/columns/8700460"}] + +https +GET +api.github.com +None +/projects/columns/8700460/cards?archived_state=archived +{'Accept': 'application/vnd.github.inertia-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Tue, 14 Apr 2020 18:14:57 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4997'), ('X-RateLimit-Reset', '1586891696'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"cc21f8c4409a7da6edaceac3de3cd1db"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.inertia-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'E7CE:19719:159B57E:1967FB3:5E95FDA1')] +[{"url":"https://api.github.com/projects/columns/cards/36281516","project_url":"https://api.github.com/projects/4294766","id":36281516,"node_id":"MDExOlByb2plY3RDYXJkMzYyODE1MTY=","note":"Note1","archived":true,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:00:32Z","updated_at":"2020-04-14T16:57:32Z","column_url":"https://api.github.com/projects/columns/8700460"}] + diff --git a/tests/ReplayData/ProjectColumn.testGetCards.txt b/tests/ReplayData/ProjectColumn.testGetCards.txt new file mode 100644 index 00000000..a357b41c --- /dev/null +++ b/tests/ReplayData/ProjectColumn.testGetCards.txt @@ -0,0 +1,22 @@ +https +GET +api.github.com +None +/projects/columns/8700460/cards?per_page=1 +{'Accept': 'application/vnd.github.inertia-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Tue, 14 Apr 2020 18:17:22 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4974'), ('X-RateLimit-Reset', '1586891696'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"c3932f4fc4f085b929f97a755d4bc619"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.inertia-preview; format=json'), ('Link', '; rel="next", ; rel="last"'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'E8E8:1971C:1EB93F0:2444EAC:5E95FE31')] +[{"url":"https://api.github.com/projects/columns/cards/36285184","project_url":"https://api.github.com/projects/4294766","id":36285184,"node_id":"MDExOlByb2plY3RDYXJkMzYyODUxODQ=","note":"Note3","archived":false,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:57:26Z","updated_at":"2020-04-14T16:57:26Z","column_url":"https://api.github.com/projects/columns/8700460"}] + +https +GET +api.github.com +None +/projects/columns/8700460/cards +{'Accept': 'application/vnd.github.inertia-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Tue, 14 Apr 2020 18:17:22 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4973'), ('X-RateLimit-Reset', '1586891695'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"a4b6a7e2eacfdbb711423183c140c383"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.inertia-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'E8EA:3F6D7:2582A1B:2C3B9FA:5E95FE32')] +[{"url":"https://api.github.com/projects/columns/cards/36285184","project_url":"https://api.github.com/projects/4294766","id":36285184,"node_id":"MDExOlByb2plY3RDYXJkMzYyODUxODQ=","note":"Note3","archived":false,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:57:26Z","updated_at":"2020-04-14T16:57:26Z","column_url":"https://api.github.com/projects/columns/8700460"},{"url":"https://api.github.com/projects/columns/cards/36281526","project_url":"https://api.github.com/projects/4294766","id":36281526,"node_id":"MDExOlByb2plY3RDYXJkMzYyODE1MjY=","note":"Note2","archived":false,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:00:37Z","updated_at":"2020-04-14T16:00:37Z","column_url":"https://api.github.com/projects/columns/8700460"}] + diff --git a/tests/ReplayData/ProjectColumn.testGetNotArchivedCards.txt b/tests/ReplayData/ProjectColumn.testGetNotArchivedCards.txt new file mode 100644 index 00000000..0e0e4391 --- /dev/null +++ b/tests/ReplayData/ProjectColumn.testGetNotArchivedCards.txt @@ -0,0 +1,22 @@ +https +GET +api.github.com +None +/projects/columns/8700460/cards?archived_state=not_archived&per_page=1 +{'Accept': 'application/vnd.github.inertia-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Tue, 14 Apr 2020 18:16:27 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4980'), ('X-RateLimit-Reset', '1586891696'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"c3932f4fc4f085b929f97a755d4bc619"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.inertia-preview; format=json'), ('Link', '; rel="next", ; rel="last"'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'E8DA:428A3:2603E5A:2CCBA73:5E95FDFB')] +[{"url":"https://api.github.com/projects/columns/cards/36285184","project_url":"https://api.github.com/projects/4294766","id":36285184,"node_id":"MDExOlByb2plY3RDYXJkMzYyODUxODQ=","note":"Note3","archived":false,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:57:26Z","updated_at":"2020-04-14T16:57:26Z","column_url":"https://api.github.com/projects/columns/8700460"}] + +https +GET +api.github.com +None +/projects/columns/8700460/cards?archived_state=not_archived +{'Accept': 'application/vnd.github.inertia-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Tue, 14 Apr 2020 18:16:27 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4979'), ('X-RateLimit-Reset', '1586891695'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"a4b6a7e2eacfdbb711423183c140c383"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.inertia-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'E8DC:19719:15A2CB9:1970B81:5E95FDFB')] +[{"url":"https://api.github.com/projects/columns/cards/36285184","project_url":"https://api.github.com/projects/4294766","id":36285184,"node_id":"MDExOlByb2plY3RDYXJkMzYyODUxODQ=","note":"Note3","archived":false,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:57:26Z","updated_at":"2020-04-14T16:57:26Z","column_url":"https://api.github.com/projects/columns/8700460"},{"url":"https://api.github.com/projects/columns/cards/36281526","project_url":"https://api.github.com/projects/4294766","id":36281526,"node_id":"MDExOlByb2plY3RDYXJkMzYyODE1MjY=","note":"Note2","archived":false,"creator":{"login":"FlorentClarret","id":1266346,"node_id":"MDQ6VXNlcjEyNjYzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1266346?u=9ff2d1d568ef21b9fc83b189c44594d5816a9990&v=4","gravatar_id":"","url":"https://api.github.com/users/FlorentClarret","html_url":"https://github.com/FlorentClarret","followers_url":"https://api.github.com/users/FlorentClarret/followers","following_url":"https://api.github.com/users/FlorentClarret/following{/other_user}","gists_url":"https://api.github.com/users/FlorentClarret/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorentClarret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorentClarret/subscriptions","organizations_url":"https://api.github.com/users/FlorentClarret/orgs","repos_url":"https://api.github.com/users/FlorentClarret/repos","events_url":"https://api.github.com/users/FlorentClarret/events{/privacy}","received_events_url":"https://api.github.com/users/FlorentClarret/received_events","type":"User","site_admin":false},"created_at":"2020-04-14T16:00:37Z","updated_at":"2020-04-14T16:00:37Z","column_url":"https://api.github.com/projects/columns/8700460"}] + diff --git a/tests/ReplayData/ProjectColumn.testGetProjectColumn.txt b/tests/ReplayData/ProjectColumn.testGetProjectColumn.txt new file mode 100644 index 00000000..8f825add --- /dev/null +++ b/tests/ReplayData/ProjectColumn.testGetProjectColumn.txt @@ -0,0 +1,11 @@ +https +GET +api.github.com +None +/projects/columns/8700460 +{'Accept': 'application/vnd.github.inertia-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Tue, 14 Apr 2020 15:54:41 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4973'), ('X-RateLimit-Reset', '1586881947'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"e72b42a5cf4979d0048de03ef3320a58"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.inertia-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', '8278:1971C:1B5FB42:2036E85:5E95DCC1')] +{"url":"https://api.github.com/projects/columns/8700460","project_url":"https://api.github.com/projects/4294766","cards_url":"https://api.github.com/projects/columns/8700460/cards","id":8700460,"node_id":"MDEzOlByb2plY3RDb2x1bW44NzAwNDYw","name":"c1","created_at":"2020-04-13T20:29:53Z","updated_at":"2020-04-13T20:29:53Z"} +