{"action":"created","comment":{"url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/comments/115787309","pull_request_review_id":37356858,"id":115787309,"diff_hunk":"@@ -0,0 +1,266 @@\n+# -*- coding: utf-8 -*-\n+import os\n+import unittest\n+from webtest import TestApp\n+from datetime import datetime, timedelta\n+from pyramid import testing\n+from pyramid.paster import get_app\n+from pyramid.tests.test_authentication import TestBasicAuthAuthenticationPolicy\n+\n+from openprocurement.api.auth import AuthenticationPolicy\n+from openprocurement.api.utils import apply_data_patch\n+from openprocurement.api.constants import SANDBOX_MODE\n+from openprocurement.api.tests.base import PrefixedRequestClass\n+from openprocurement.tender.core.tests.base import (\n+    BaseWebTest, BaseTenderWebTest\n+)\n+from openprocurement.tender.belowthreshold.tests.base import (\n+    test_tender_data, test_organization\n+)\n+\n+\n+now = datetime.now()\n+if SANDBOX_MODE:\n+    test_tender_data['procurementMethodDetails'] = 'quick, accelerator=1440'\n+test_tender_data_mode_test = test_tender_data.copy()\n+test_tender_data_mode_test[\"mode\"] = \"test\"\n+\n+\n+class AuthTest(TestBasicAuthAuthenticationPolicy):\n+    def _makeOne(self, check):\n+        return AuthenticationPolicy('openprocurement/tender/core/tests/auth.ini', 'SomeRealm')\n+\n+    test_authenticated_userid_utf8 = None\n+    test_authenticated_userid_latin1 = None\n+\n+    def test_unauthenticated_userid_bearer(self):\n+        request = testing.DummyRequest()\n+        request.headers['Authorization'] = 'Bearer chrisr'\n+        policy = self._makeOne(None)\n+        self.assertEqual(policy.unauthenticated_userid(request), 'chrisr')\n+\n+\n+class AccreditationTenderTest(BaseWebTest):\n+    relative_to = os.path.dirname(__file__)\n+\n+    @classmethod\n+    def setUpClass(self):","path":"openprocurement/tender/core/tests/auth.py","position":47,"original_position":47,"commit_id":"edf344634b5ba40555b7654576a964cca71d180f","original_commit_id":"edf344634b5ba40555b7654576a964cca71d180f","user":{"login":"yarsanich","id":15478059,"avatar_url":"https://avatars2.githubusercontent.com/u/15478059?v=3","gravatar_id":"","url":"https://api.github.com/users/yarsanich","html_url":"https://github.com/yarsanich","followers_url":"https://api.github.com/users/yarsanich/followers","following_url":"https://api.github.com/users/yarsanich/following{/other_user}","gists_url":"https://api.github.com/users/yarsanich/gists{/gist_id}","starred_url":"https://api.github.com/users/yarsanich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarsanich/subscriptions","organizations_url":"https://api.github.com/users/yarsanich/orgs","repos_url":"https://api.github.com/users/yarsanich/repos","events_url":"https://api.github.com/users/yarsanich/events{/privacy}","received_events_url":"https://api.github.com/users/yarsanich/received_events","type":"User","site_admin":false},"body":"Чи не підійде для цього тест кейсу BaseTenderWebTest?","created_at":"2017-05-10T16:23:19Z","updated_at":"2017-05-10T16:25:48Z","html_url":"https://github.com/openprocurement/openprocurement.tender.core/pull/39#discussion_r115787309","pull_request_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/comments/115787309"},"html":{"href":"https://github.com/openprocurement/openprocurement.tender.core/pull/39#discussion_r115787309"},"pull_request":{"href":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/39","id":119459159,"html_url":"https://github.com/openprocurement/openprocurement.tender.core/pull/39","diff_url":"https://github.com/openprocurement/openprocurement.tender.core/pull/39.diff","patch_url":"https://github.com/openprocurement/openprocurement.tender.core/pull/39.patch","issue_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/issues/39","number":39,"state":"open","locked":false,"title":"а297865629943615 test auth","user":{"login":"sasha-kantoriz","id":26918838,"avatar_url":"https://avatars3.githubusercontent.com/u/26918838?v=3","gravatar_id":"","url":"https://api.github.com/users/sasha-kantoriz","html_url":"https://github.com/sasha-kantoriz","followers_url":"https://api.github.com/users/sasha-kantoriz/followers","following_url":"https://api.github.com/users/sasha-kantoriz/following{/other_user}","gists_url":"https://api.github.com/users/sasha-kantoriz/gists{/gist_id}","starred_url":"https://api.github.com/users/sasha-kantoriz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sasha-kantoriz/subscriptions","organizations_url":"https://api.github.com/users/sasha-kantoriz/orgs","repos_url":"https://api.github.com/users/sasha-kantoriz/repos","events_url":"https://api.github.com/users/sasha-kantoriz/events{/privacy}","received_events_url":"https://api.github.com/users/sasha-kantoriz/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-05-08T14:24:06Z","updated_at":"2017-05-10T16:25:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51322e23a0f2675b24a9fede41d02ea2959a0b94","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/39/commits","review_comments_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/39/comments","review_comment_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/issues/39/comments","statuses_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/statuses/edf344634b5ba40555b7654576a964cca71d180f","head":{"label":"sasha-kantoriz:а297865629943615_test_auth","ref":"а297865629943615_test_auth","sha":"edf344634b5ba40555b7654576a964cca71d180f","user":{"login":"sasha-kantoriz","id":26918838,"avatar_url":"https://avatars3.githubusercontent.com/u/26918838?v=3","gravatar_id":"","url":"https://api.github.com/users/sasha-kantoriz","html_url":"https://github.com/sasha-kantoriz","followers_url":"https://api.github.com/users/sasha-kantoriz/followers","following_url":"https://api.github.com/users/sasha-kantoriz/following{/other_user}","gists_url":"https://api.github.com/users/sasha-kantoriz/gists{/gist_id}","starred_url":"https://api.github.com/users/sasha-kantoriz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sasha-kantoriz/subscriptions","organizations_url":"https://api.github.com/users/sasha-kantoriz/orgs","repos_url":"https://api.github.com/users/sasha-kantoriz/repos","events_url":"https://api.github.com/users/sasha-kantoriz/events{/privacy}","received_events_url":"https://api.github.com/users/sasha-kantoriz/received_events","type":"User","site_admin":false},"repo":{"id":87276314,"name":"openprocurement.tender.core","full_name":"sasha-kantoriz/openprocurement.tender.core","owner":{"login":"sasha-kantoriz","id":26918838,"avatar_url":"https://avatars3.githubusercontent.com/u/26918838?v=3","gravatar_id":"","url":"https://api.github.com/users/sasha-kantoriz","html_url":"https://github.com/sasha-kantoriz","followers_url":"https://api.github.com/users/sasha-kantoriz/followers","following_url":"https://api.github.com/users/sasha-kantoriz/following{/other_user}","gists_url":"https://api.github.com/users/sasha-kantoriz/gists{/gist_id}","starred_url":"https://api.github.com/users/sasha-kantoriz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sasha-kantoriz/subscriptions","organizations_url":"https://api.github.com/users/sasha-kantoriz/orgs","repos_url":"https://api.github.com/users/sasha-kantoriz/repos","events_url":"https://api.github.com/users/sasha-kantoriz/events{/privacy}","received_events_url":"https://api.github.com/users/sasha-kantoriz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sasha-kantoriz/openprocurement.tender.core","description":null,"fork":true,"url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core","forks_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/forks","keys_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/teams","hooks_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/hooks","issue_events_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/issues/events{/number}","events_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/events","assignees_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/assignees{/user}","branches_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/branches{/branch}","tags_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/tags","blobs_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/git/refs{/sha}","trees_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/statuses/{sha}","languages_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/languages","stargazers_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/stargazers","contributors_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/contributors","subscribers_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/subscribers","subscription_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/subscription","commits_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/commits{/sha}","git_commits_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/git/commits{/sha}","comments_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/comments{/number}","issue_comment_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/issues/comments{/number}","contents_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/contents/{+path}","compare_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/merges","archive_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/downloads","issues_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/issues{/number}","pulls_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/pulls{/number}","milestones_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/milestones{/number}","notifications_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/labels{/name}","releases_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/releases{/id}","deployments_url":"https://api.github.com/repos/sasha-kantoriz/openprocurement.tender.core/deployments","created_at":"2017-04-05T06:52:49Z","updated_at":"2017-04-05T06:52:51Z","pushed_at":"2017-05-08T14:20:11Z","git_url":"git://github.com/sasha-kantoriz/openprocurement.tender.core.git","ssh_url":"git@github.com:sasha-kantoriz/openprocurement.tender.core.git","clone_url":"https://github.com/sasha-kantoriz/openprocurement.tender.core.git","svn_url":"https://github.com/sasha-kantoriz/openprocurement.tender.core","homepage":null,"size":174,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openprocurement:master","ref":"master","sha":"bc510f726f1840634a2a8769784de7cb2e483b5a","user":{"login":"openprocurement","id":8692431,"avatar_url":"https://avatars1.githubusercontent.com/u/8692431?v=3","gravatar_id":"","url":"https://api.github.com/users/openprocurement","html_url":"https://github.com/openprocurement","followers_url":"https://api.github.com/users/openprocurement/followers","following_url":"https://api.github.com/users/openprocurement/following{/other_user}","gists_url":"https://api.github.com/users/openprocurement/gists{/gist_id}","starred_url":"https://api.github.com/users/openprocurement/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openprocurement/subscriptions","organizations_url":"https://api.github.com/users/openprocurement/orgs","repos_url":"https://api.github.com/users/openprocurement/repos","events_url":"https://api.github.com/users/openprocurement/events{/privacy}","received_events_url":"https://api.github.com/users/openprocurement/received_events","type":"Organization","site_admin":false},"repo":{"id":82294787,"name":"openprocurement.tender.core","full_name":"openprocurement/openprocurement.tender.core","owner":{"login":"openprocurement","id":8692431,"avatar_url":"https://avatars1.githubusercontent.com/u/8692431?v=3","gravatar_id":"","url":"https://api.github.com/users/openprocurement","html_url":"https://github.com/openprocurement","followers_url":"https://api.github.com/users/openprocurement/followers","following_url":"https://api.github.com/users/openprocurement/following{/other_user}","gists_url":"https://api.github.com/users/openprocurement/gists{/gist_id}","starred_url":"https://api.github.com/users/openprocurement/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openprocurement/subscriptions","organizations_url":"https://api.github.com/users/openprocurement/orgs","repos_url":"https://api.github.com/users/openprocurement/repos","events_url":"https://api.github.com/users/openprocurement/events{/privacy}","received_events_url":"https://api.github.com/users/openprocurement/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openprocurement/openprocurement.tender.core","description":null,"fork":false,"url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core","forks_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/forks","keys_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/teams","hooks_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/hooks","issue_events_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/issues/events{/number}","events_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/events","assignees_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/assignees{/user}","branches_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/branches{/branch}","tags_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/tags","blobs_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/git/refs{/sha}","trees_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/statuses/{sha}","languages_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/languages","stargazers_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/stargazers","contributors_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/contributors","subscribers_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/subscribers","subscription_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/subscription","commits_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/commits{/sha}","git_commits_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/git/commits{/sha}","comments_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/comments{/number}","issue_comment_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/issues/comments{/number}","contents_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/contents/{+path}","compare_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/merges","archive_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/downloads","issues_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/issues{/number}","pulls_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls{/number}","milestones_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/milestones{/number}","notifications_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/labels{/name}","releases_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/releases{/id}","deployments_url":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/deployments","created_at":"2017-02-17T12:20:44Z","updated_at":"2017-02-17T17:29:55Z","pushed_at":"2017-05-08T14:24:07Z","git_url":"git://github.com/openprocurement/openprocurement.tender.core.git","ssh_url":"git@github.com:openprocurement/openprocurement.tender.core.git","clone_url":"https://github.com/openprocurement/openprocurement.tender.core.git","svn_url":"https://github.com/openprocurement/openprocurement.tender.core","homepage":null,"size":102,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/39"},"html":{"href":"https://github.com/openprocurement/openprocurement.tender.core/pull/39"},"issue":{"href":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/issues/39"},"comments":{"href":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/openprocurement/openprocurement.tender.core/statuses/edf344634b5ba40555b7654576a964cca71d180f"}}}}
{"actor":{"display_login":"yarsanich"}}