{"action":"created","comment":{"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/comments/37529539","id":37529539,"diff_hunk":"@@ -184,3 +184,69 @@ def mock_urlopen(url):\n         self.assertEqual(len(expected_urls_to_resolve), len(urls_to_resolve))\n         for resolved_url in expected_urls_to_resolve:\n             self.assertIn(resolved_url, urls_to_resolve)\n+\n+\n+class TestDefaultResolverValidations(testtools.TestCase):\n+\n+    def test_illegal_default_resolver_rule(self):\n+        # wrong rule configuration\n+        rule = {'only': 'one', 'pair': 'allowed'}\n+        params = {\n+            'rules': [rule]\n+        }\n+        try:\n+            DefaultImportResolver(**params)\n+        except DefaultResolverValidationException, ex:\n+            self.assertIn('the rule [{0}] has 2 keys'.format(rule), str(ex))\n+\n+    def test_illegal_default_resolver_rules_type(self):\n+        # wrong rule configuration\n+        params = {\n+            'rules': 'this should be a list'\n+        }\n+        try:\n+            DefaultImportResolver(**params)\n+        except DefaultResolverValidationException, ex:\n+            self.assertIn(\n+                'The `rules` parameter must be a list but it is of type str',\n+                str(ex))\n+\n+    def test_illegal_default_resolver_rule_type(self):\n+        # wrong rule configuration\n+        rule = 'this should be a dict'\n+        rules = [rule]\n+        params = {\n+            'rules': rules\n+        }\n+        try:\n+            DefaultImportResolver(**params)\n+        except DefaultResolverValidationException, ex:\n+            self.assertIn(\n+                'Each rule must be a dictionary but the rule '\n+                '[{0}] is of type {1}'.format(rule, type(rule).__name__),\n+                str(ex))\n+\n+    def test_get_default_resolver_illegal_rule_size(self):","path":"dsl_parser/tests/test_deafult_import_resolver.py","position":64,"original_position":64,"commit_id":"dbade5d9c543c37724b21aa0cedfb517cd10378d","original_commit_id":"dbade5d9c543c37724b21aa0cedfb517cd10378d","user":{"login":"noakup","id":1745412,"avatar_url":"https://avatars.githubusercontent.com/u/1745412?v=3","gravatar_id":"","url":"https://api.github.com/users/noakup","html_url":"https://github.com/noakup","followers_url":"https://api.github.com/users/noakup/followers","following_url":"https://api.github.com/users/noakup/following{/other_user}","gists_url":"https://api.github.com/users/noakup/gists{/gist_id}","starred_url":"https://api.github.com/users/noakup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noakup/subscriptions","organizations_url":"https://api.github.com/users/noakup/orgs","repos_url":"https://api.github.com/users/noakup/repos","events_url":"https://api.github.com/users/noakup/events{/privacy}","received_events_url":"https://api.github.com/users/noakup/received_events","type":"User","site_admin":false},"body":"doesn't that check the same thing as 'test_illegal_default_resolver_rule'?","created_at":"2015-08-20T13:41:00Z","updated_at":"2015-08-20T13:41:00Z","html_url":"https://github.com/cloudify-cosmo/cloudify-dsl-parser/pull/57#discussion_r37529539","pull_request_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/comments/37529539"},"html":{"href":"https://github.com/cloudify-cosmo/cloudify-dsl-parser/pull/57#discussion_r37529539"},"pull_request":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/57","id":42676303,"html_url":"https://github.com/cloudify-cosmo/cloudify-dsl-parser/pull/57","diff_url":"https://github.com/cloudify-cosmo/cloudify-dsl-parser/pull/57.diff","patch_url":"https://github.com/cloudify-cosmo/cloudify-dsl-parser/pull/57.patch","issue_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/issues/57","number":57,"state":"open","locked":false,"title":"CFY-3316 added get_class_instance method","user":{"login":"yaelpeled","id":1758681,"avatar_url":"https://avatars.githubusercontent.com/u/1758681?v=3","gravatar_id":"","url":"https://api.github.com/users/yaelpeled","html_url":"https://github.com/yaelpeled","followers_url":"https://api.github.com/users/yaelpeled/followers","following_url":"https://api.github.com/users/yaelpeled/following{/other_user}","gists_url":"https://api.github.com/users/yaelpeled/gists{/gist_id}","starred_url":"https://api.github.com/users/yaelpeled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaelpeled/subscriptions","organizations_url":"https://api.github.com/users/yaelpeled/orgs","repos_url":"https://api.github.com/users/yaelpeled/repos","events_url":"https://api.github.com/users/yaelpeled/events{/privacy}","received_events_url":"https://api.github.com/users/yaelpeled/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-18T09:10:04Z","updated_at":"2015-08-20T13:41:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf67236d6923e7ac86fd02409d5e204427769d09","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/57/commits","review_comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/57/comments","review_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/issues/57/comments","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/statuses/dbade5d9c543c37724b21aa0cedfb517cd10378d","head":{"label":"cloudify-cosmo:CFY-3316-import-resolver","ref":"CFY-3316-import-resolver","sha":"dbade5d9c543c37724b21aa0cedfb517cd10378d","user":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"repo":{"id":18327612,"name":"cloudify-dsl-parser","full_name":"cloudify-cosmo/cloudify-dsl-parser","owner":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudify-cosmo/cloudify-dsl-parser","description":"Cloudify DSL Parser","fork":false,"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser","forks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/forks","keys_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/teams","hooks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/hooks","issue_events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/issues/events{/number}","events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/events","assignees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/assignees{/user}","branches_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/branches{/branch}","tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/tags","blobs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/languages","stargazers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/stargazers","contributors_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/contributors","subscribers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/subscribers","subscription_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/subscription","commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/contents/{+path}","compare_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/merges","archive_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/downloads","issues_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/issues{/number}","pulls_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/labels{/name}","releases_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/releases{/id}","created_at":"2014-04-01T11:47:37Z","updated_at":"2015-08-06T07:26:09Z","pushed_at":"2015-08-20T13:31:41Z","git_url":"git://github.com/cloudify-cosmo/cloudify-dsl-parser.git","ssh_url":"git@github.com:cloudify-cosmo/cloudify-dsl-parser.git","clone_url":"https://github.com/cloudify-cosmo/cloudify-dsl-parser.git","svn_url":"https://github.com/cloudify-cosmo/cloudify-dsl-parser","homepage":null,"size":6190,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"cloudify-cosmo:master","ref":"master","sha":"dd7fbbfed19d290be9a7dd0ba3e94d06de93621d","user":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"repo":{"id":18327612,"name":"cloudify-dsl-parser","full_name":"cloudify-cosmo/cloudify-dsl-parser","owner":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudify-cosmo/cloudify-dsl-parser","description":"Cloudify DSL Parser","fork":false,"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser","forks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/forks","keys_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/teams","hooks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/hooks","issue_events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/issues/events{/number}","events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/events","assignees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/assignees{/user}","branches_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/branches{/branch}","tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/tags","blobs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/languages","stargazers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/stargazers","contributors_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/contributors","subscribers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/subscribers","subscription_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/subscription","commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/contents/{+path}","compare_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/merges","archive_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/downloads","issues_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/issues{/number}","pulls_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/labels{/name}","releases_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/releases{/id}","created_at":"2014-04-01T11:47:37Z","updated_at":"2015-08-06T07:26:09Z","pushed_at":"2015-08-20T13:31:41Z","git_url":"git://github.com/cloudify-cosmo/cloudify-dsl-parser.git","ssh_url":"git@github.com:cloudify-cosmo/cloudify-dsl-parser.git","clone_url":"https://github.com/cloudify-cosmo/cloudify-dsl-parser.git","svn_url":"https://github.com/cloudify-cosmo/cloudify-dsl-parser","homepage":null,"size":6190,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/57"},"html":{"href":"https://github.com/cloudify-cosmo/cloudify-dsl-parser/pull/57"},"issue":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/issues/57"},"comments":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-dsl-parser/statuses/dbade5d9c543c37724b21aa0cedfb517cd10378d"}}}}