{"action":"created","comment":{"url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/comments/208437846","pull_request_review_id":144246752,"id":208437846,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODQzNzg0Ng==","diff_hunk":"@@ -1,46 +1,58 @@\n # -*- coding: utf-8 -*-\n from brasil.gov.tiles.testing import INTEGRATION_TESTING\n-from collective.cover.config import IS_PLONE_5\n from collective.cover.controlpanel import ICoverSettings\n-from collective.cover.tests.test_upgrades import UpgradeTestCaseBase\n from plone import api\n \n import unittest\n \n \n-class UpgradeTestCaseBrasilGovTitles(UpgradeTestCaseBase):\n-    \"\"\"\n-    Classe que altera o profile_id para 'brasil.gov.tiles:default'\n-    \"\"\"\n+class BaseUpgradeTestCase(unittest.TestCase):\n \n-    def setUp(self, from_version, to_version):\n-        UpgradeTestCaseBase.setUp(self, from_version, to_version)\n-        self.profile_id = u'brasil.gov.tiles:default'\n+    layer = INTEGRATION_TESTING\n+    profile_id = u'brasil.gov.tiles:default'\n \n+    def setUp(self):\n+        self.portal = self.layer['portal']\n+        self.setup = self.portal['portal_setup']\n+        self.setup.setLastVersionForProfile(self.profile_id, self.from_)\n \n-# FIXME: move all steps to 4100\n-class Upgrade4004to4005TestCase(UpgradeTestCaseBrasilGovTitles):\n+    def _get_upgrade_step_by_title(self, title):\n+        \"\"\"Return the upgrade step that matches the title specified.\"\"\"\n+        self.setup.setLastVersionForProfile(self.profile_id, self.from_)\n+        upgrades = self.setup.listUpgrades(self.profile_id)\n+        steps = [s for s in upgrades[0] if s['title'] == title]\n+        return steps[0] if steps else None\n \n-    layer = INTEGRATION_TESTING\n+    def _do_upgrade(self, step):\n+        \"\"\"Execute an upgrade step.\"\"\"\n+        request = self.layer['request']\n+        request.form['profile_id'] = self.profile_id\n+        request.form['upgrades'] = [step['id']]\n+        self.setup.manage_doUpgrades(request=request)\n \n-    def setUp(self):\n-        super(Upgrade4004to4005TestCase, self).setUp(u'4004', u'4005')\n \n-    def test_registrations(self):\n+class UpgradeTo4100TestCase(BaseUpgradeTestCase):\n+\n+    from_ = u'*'\n+    to_ = u'4100'","path":"src/brasil/gov/tiles/tests/test_upgrades.py","position":52,"original_position":52,"commit_id":"2dc8676bf059dc3e6c9443518fc875cf2c7b339c","original_commit_id":"2dc8676bf059dc3e6c9443518fc875cf2c7b339c","user":{"login":"hvelarde","id":341393,"node_id":"MDQ6VXNlcjM0MTM5Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/341393?v=4","gravatar_id":"","url":"https://api.github.com/users/hvelarde","html_url":"https://github.com/hvelarde","followers_url":"https://api.github.com/users/hvelarde/followers","following_url":"https://api.github.com/users/hvelarde/following{/other_user}","gists_url":"https://api.github.com/users/hvelarde/gists{/gist_id}","starred_url":"https://api.github.com/users/hvelarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvelarde/subscriptions","organizations_url":"https://api.github.com/users/hvelarde/orgs","repos_url":"https://api.github.com/users/hvelarde/repos","events_url":"https://api.github.com/users/hvelarde/events{/privacy}","received_events_url":"https://api.github.com/users/hvelarde/received_events","type":"User","site_admin":false},"body":"we should use it instead.","created_at":"2018-08-08T02:13:31Z","updated_at":"2018-08-08T02:13:31Z","html_url":"https://github.com/plonegovbr/brasil.gov.tiles/pull/221#discussion_r208437846","pull_request_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/221","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/comments/208437846"},"html":{"href":"https://github.com/plonegovbr/brasil.gov.tiles/pull/221#discussion_r208437846"},"pull_request":{"href":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/221"}},"in_reply_to_id":208223578},"pull_request":{"url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/221","id":206527549,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2NTI3NTQ5","html_url":"https://github.com/plonegovbr/brasil.gov.tiles/pull/221","diff_url":"https://github.com/plonegovbr/brasil.gov.tiles/pull/221.diff","patch_url":"https://github.com/plonegovbr/brasil.gov.tiles/pull/221.patch","issue_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/issues/221","number":221,"state":"closed","locked":false,"title":"Fix upgrade steps for branch 2.x","user":{"login":"hvelarde","id":341393,"node_id":"MDQ6VXNlcjM0MTM5Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/341393?v=4","gravatar_id":"","url":"https://api.github.com/users/hvelarde","html_url":"https://github.com/hvelarde","followers_url":"https://api.github.com/users/hvelarde/followers","following_url":"https://api.github.com/users/hvelarde/following{/other_user}","gists_url":"https://api.github.com/users/hvelarde/gists{/gist_id}","starred_url":"https://api.github.com/users/hvelarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvelarde/subscriptions","organizations_url":"https://api.github.com/users/hvelarde/orgs","repos_url":"https://api.github.com/users/hvelarde/repos","events_url":"https://api.github.com/users/hvelarde/events{/privacy}","received_events_url":"https://api.github.com/users/hvelarde/received_events","type":"User","site_admin":false},"body":"closes #213 ","created_at":"2018-08-06T21:56:49Z","updated_at":"2018-08-08T02:13:31Z","closed_at":"2018-08-06T22:59:08Z","merged_at":"2018-08-06T22:59:08Z","merge_commit_sha":"c04da406e5bfe43ad12132e15081735a258d0f16","assignee":null,"assignees":[],"requested_reviewers":[{"login":"claytonc","id":1719539,"node_id":"MDQ6VXNlcjE3MTk1Mzk=","avatar_url":"https://avatars2.githubusercontent.com/u/1719539?v=4","gravatar_id":"","url":"https://api.github.com/users/claytonc","html_url":"https://github.com/claytonc","followers_url":"https://api.github.com/users/claytonc/followers","following_url":"https://api.github.com/users/claytonc/following{/other_user}","gists_url":"https://api.github.com/users/claytonc/gists{/gist_id}","starred_url":"https://api.github.com/users/claytonc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claytonc/subscriptions","organizations_url":"https://api.github.com/users/claytonc/orgs","repos_url":"https://api.github.com/users/claytonc/repos","events_url":"https://api.github.com/users/claytonc/events{/privacy}","received_events_url":"https://api.github.com/users/claytonc/received_events","type":"User","site_admin":false},{"login":"idgserpro","id":8203476,"node_id":"MDQ6VXNlcjgyMDM0NzY=","avatar_url":"https://avatars3.githubusercontent.com/u/8203476?v=4","gravatar_id":"","url":"https://api.github.com/users/idgserpro","html_url":"https://github.com/idgserpro","followers_url":"https://api.github.com/users/idgserpro/followers","following_url":"https://api.github.com/users/idgserpro/following{/other_user}","gists_url":"https://api.github.com/users/idgserpro/gists{/gist_id}","starred_url":"https://api.github.com/users/idgserpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idgserpro/subscriptions","organizations_url":"https://api.github.com/users/idgserpro/orgs","repos_url":"https://api.github.com/users/idgserpro/repos","events_url":"https://api.github.com/users/idgserpro/events{/privacy}","received_events_url":"https://api.github.com/users/idgserpro/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/221/commits","review_comments_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/221/comments","review_comment_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/comments{/number}","comments_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/issues/221/comments","statuses_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/statuses/2dc8676bf059dc3e6c9443518fc875cf2c7b339c","head":{"label":"plonegovbr:hvelarde-upgrade","ref":"hvelarde-upgrade","sha":"2dc8676bf059dc3e6c9443518fc875cf2c7b339c","user":{"login":"plonegovbr","id":1334477,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzQ0Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1334477?v=4","gravatar_id":"","url":"https://api.github.com/users/plonegovbr","html_url":"https://github.com/plonegovbr","followers_url":"https://api.github.com/users/plonegovbr/followers","following_url":"https://api.github.com/users/plonegovbr/following{/other_user}","gists_url":"https://api.github.com/users/plonegovbr/gists{/gist_id}","starred_url":"https://api.github.com/users/plonegovbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plonegovbr/subscriptions","organizations_url":"https://api.github.com/users/plonegovbr/orgs","repos_url":"https://api.github.com/users/plonegovbr/repos","events_url":"https://api.github.com/users/plonegovbr/events{/privacy}","received_events_url":"https://api.github.com/users/plonegovbr/received_events","type":"Organization","site_admin":false},"repo":{"id":9462835,"node_id":"MDEwOlJlcG9zaXRvcnk5NDYyODM1","name":"brasil.gov.tiles","full_name":"plonegovbr/brasil.gov.tiles","owner":{"login":"plonegovbr","id":1334477,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzQ0Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1334477?v=4","gravatar_id":"","url":"https://api.github.com/users/plonegovbr","html_url":"https://github.com/plonegovbr","followers_url":"https://api.github.com/users/plonegovbr/followers","following_url":"https://api.github.com/users/plonegovbr/following{/other_user}","gists_url":"https://api.github.com/users/plonegovbr/gists{/gist_id}","starred_url":"https://api.github.com/users/plonegovbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plonegovbr/subscriptions","organizations_url":"https://api.github.com/users/plonegovbr/orgs","repos_url":"https://api.github.com/users/plonegovbr/repos","events_url":"https://api.github.com/users/plonegovbr/events{/privacy}","received_events_url":"https://api.github.com/users/plonegovbr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plonegovbr/brasil.gov.tiles","description":"Blocos de Conteúdo (Tiles) para sites do Governo Brasileiro","fork":false,"url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles","forks_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/forks","keys_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/teams","hooks_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/hooks","issue_events_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/issues/events{/number}","events_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/events","assignees_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/assignees{/user}","branches_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/branches{/branch}","tags_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/tags","blobs_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/git/refs{/sha}","trees_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/statuses/{sha}","languages_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/languages","stargazers_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/stargazers","contributors_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/contributors","subscribers_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/subscribers","subscription_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/subscription","commits_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/commits{/sha}","git_commits_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/git/commits{/sha}","comments_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/comments{/number}","issue_comment_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/issues/comments{/number}","contents_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/contents/{+path}","compare_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/merges","archive_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/downloads","issues_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/issues{/number}","pulls_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls{/number}","milestones_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/milestones{/number}","notifications_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/labels{/name}","releases_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/releases{/id}","deployments_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/deployments","created_at":"2013-04-16T02:41:05Z","updated_at":"2018-08-07T00:38:12Z","pushed_at":"2018-08-07T00:38:38Z","git_url":"git://github.com/plonegovbr/brasil.gov.tiles.git","ssh_url":"git@github.com:plonegovbr/brasil.gov.tiles.git","clone_url":"https://github.com/plonegovbr/brasil.gov.tiles.git","svn_url":"https://github.com/plonegovbr/brasil.gov.tiles","homepage":null,"size":1612,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":30,"license":null,"forks":8,"open_issues":30,"watchers":2,"default_branch":"master"}},"base":{"label":"plonegovbr:master","ref":"master","sha":"6850bb1bc6c5029182e2a0e3e8bb7949e7a33f7f","user":{"login":"plonegovbr","id":1334477,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzQ0Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1334477?v=4","gravatar_id":"","url":"https://api.github.com/users/plonegovbr","html_url":"https://github.com/plonegovbr","followers_url":"https://api.github.com/users/plonegovbr/followers","following_url":"https://api.github.com/users/plonegovbr/following{/other_user}","gists_url":"https://api.github.com/users/plonegovbr/gists{/gist_id}","starred_url":"https://api.github.com/users/plonegovbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plonegovbr/subscriptions","organizations_url":"https://api.github.com/users/plonegovbr/orgs","repos_url":"https://api.github.com/users/plonegovbr/repos","events_url":"https://api.github.com/users/plonegovbr/events{/privacy}","received_events_url":"https://api.github.com/users/plonegovbr/received_events","type":"Organization","site_admin":false},"repo":{"id":9462835,"node_id":"MDEwOlJlcG9zaXRvcnk5NDYyODM1","name":"brasil.gov.tiles","full_name":"plonegovbr/brasil.gov.tiles","owner":{"login":"plonegovbr","id":1334477,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzQ0Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1334477?v=4","gravatar_id":"","url":"https://api.github.com/users/plonegovbr","html_url":"https://github.com/plonegovbr","followers_url":"https://api.github.com/users/plonegovbr/followers","following_url":"https://api.github.com/users/plonegovbr/following{/other_user}","gists_url":"https://api.github.com/users/plonegovbr/gists{/gist_id}","starred_url":"https://api.github.com/users/plonegovbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plonegovbr/subscriptions","organizations_url":"https://api.github.com/users/plonegovbr/orgs","repos_url":"https://api.github.com/users/plonegovbr/repos","events_url":"https://api.github.com/users/plonegovbr/events{/privacy}","received_events_url":"https://api.github.com/users/plonegovbr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plonegovbr/brasil.gov.tiles","description":"Blocos de Conteúdo (Tiles) para sites do Governo Brasileiro","fork":false,"url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles","forks_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/forks","keys_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/teams","hooks_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/hooks","issue_events_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/issues/events{/number}","events_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/events","assignees_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/assignees{/user}","branches_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/branches{/branch}","tags_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/tags","blobs_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/git/refs{/sha}","trees_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/statuses/{sha}","languages_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/languages","stargazers_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/stargazers","contributors_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/contributors","subscribers_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/subscribers","subscription_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/subscription","commits_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/commits{/sha}","git_commits_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/git/commits{/sha}","comments_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/comments{/number}","issue_comment_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/issues/comments{/number}","contents_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/contents/{+path}","compare_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/merges","archive_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/downloads","issues_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/issues{/number}","pulls_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls{/number}","milestones_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/milestones{/number}","notifications_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/labels{/name}","releases_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/releases{/id}","deployments_url":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/deployments","created_at":"2013-04-16T02:41:05Z","updated_at":"2018-08-07T00:38:12Z","pushed_at":"2018-08-07T00:38:38Z","git_url":"git://github.com/plonegovbr/brasil.gov.tiles.git","ssh_url":"git@github.com:plonegovbr/brasil.gov.tiles.git","clone_url":"https://github.com/plonegovbr/brasil.gov.tiles.git","svn_url":"https://github.com/plonegovbr/brasil.gov.tiles","homepage":null,"size":1612,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":30,"license":null,"forks":8,"open_issues":30,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/221"},"html":{"href":"https://github.com/plonegovbr/brasil.gov.tiles/pull/221"},"issue":{"href":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/issues/221"},"comments":{"href":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/issues/221/comments"},"review_comments":{"href":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/221/comments"},"review_comment":{"href":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/pulls/221/commits"},"statuses":{"href":"https://api.github.com/repos/plonegovbr/brasil.gov.tiles/statuses/2dc8676bf059dc3e6c9443518fc875cf2c7b339c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"hvelarde"}}