{"action":"created","comment":{"url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments/24974764","id":24974764,"diff_hunk":"@@ -28,3 +28,62 @@ def test_catalog_ordering(self):\n         self.failUnless(resp.content_type == 'application/json')\n         self.failUnless('AGNES' in resp.json['results']['root']['children'][0]['children'][0]['children'][0]['label'])\n         self.failUnless('Geoid in CH1903' in resp.json['results']['root']['children'][0]['children'][0]['children'][1]['label'])\n+\n+    def test_catalog_languages(self):\n+        for lang in ('de', 'fr', 'it', 'rm', 'en'):\n+            link = '/rest/services/ech/CatalogServer?lang=' + lang\n+            resp = self.testapp.get(link)\n+            self.failUnless(resp.status_int == 200, link)\n+\n+    def test_all_catalogs(self):\n+\n+        def existInTree(id, root):\n+            if (root['id'] == id):\n+                return True\n+            if 'children' in root:\n+                for child in root.get('children'):\n+                    if (existInTree(id, child)):\n+                        return True\n+            return False\n+\n+        def existInList(node, l):\n+            found = False\n+            for entry in l:\n+                if entry.id == node.get('id'):\n+                    found = True\n+                    break\n+\n+            if not found:\n+                print node.get('id')","path":"chsdi/tests/integration/test_catalog.py","position":30,"original_position":30,"commit_id":"d8e6f181757268767b6bdef237d0f7bc428c7657","original_commit_id":"d8e6f181757268767b6bdef237d0f7bc428c7657","user":{"login":"gjn","id":2572317,"avatar_url":"https://avatars.githubusercontent.com/u/2572317?v=3","gravatar_id":"","url":"https://api.github.com/users/gjn","html_url":"https://github.com/gjn","followers_url":"https://api.github.com/users/gjn/followers","following_url":"https://api.github.com/users/gjn/following{/other_user}","gists_url":"https://api.github.com/users/gjn/gists{/gist_id}","starred_url":"https://api.github.com/users/gjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjn/subscriptions","organizations_url":"https://api.github.com/users/gjn/orgs","repos_url":"https://api.github.com/users/gjn/repos","events_url":"https://api.github.com/users/gjn/events{/privacy}","received_events_url":"https://api.github.com/users/gjn/received_events","type":"User","site_admin":false},"body":"Yes, we have traceback, but we only know the line and since this is in a loop, we don't know which ID fails, therefore we print it to have it in console.","created_at":"2015-02-19T09:35:48Z","updated_at":"2015-02-19T09:35:48Z","html_url":"https://github.com/geoadmin/mf-chsdi3/pull/1289#discussion_r24974764","pull_request_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1289","_links":{"self":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments/24974764"},"html":{"href":"https://github.com/geoadmin/mf-chsdi3/pull/1289#discussion_r24974764"},"pull_request":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1289"}}},"pull_request":{"url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1289","id":29518302,"html_url":"https://github.com/geoadmin/mf-chsdi3/pull/1289","diff_url":"https://github.com/geoadmin/mf-chsdi3/pull/1289.diff","patch_url":"https://github.com/geoadmin/mf-chsdi3/pull/1289.patch","issue_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1289","number":1289,"state":"open","locked":false,"title":"[WIP] Add tests to test all catalogs with staging prod","user":{"login":"gjn","id":2572317,"avatar_url":"https://avatars.githubusercontent.com/u/2572317?v=3","gravatar_id":"","url":"https://api.github.com/users/gjn","html_url":"https://github.com/gjn","followers_url":"https://api.github.com/users/gjn/followers","following_url":"https://api.github.com/users/gjn/following{/other_user}","gists_url":"https://api.github.com/users/gjn/gists{/gist_id}","starred_url":"https://api.github.com/users/gjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjn/subscriptions","organizations_url":"https://api.github.com/users/gjn/orgs","repos_url":"https://api.github.com/users/gjn/repos","events_url":"https://api.github.com/users/gjn/events{/privacy}","received_events_url":"https://api.github.com/users/gjn/received_events","type":"User","site_admin":false},"body":"This tests all catalogs with staging prod. It compares the json returned by Catalog Service (hierarchical) with the catalog view in the db (flat). Each element in one has to be in the other and there can't be elements that are in one but not in the other.\r\n\r\nThis would have catched the bafu catalog error we had last week during our nightly tests.","created_at":"2015-02-18T11:30:45Z","updated_at":"2015-02-19T09:35:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f63aa6744cdb9083f668651937516df5c38a7ec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1289/commits","review_comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1289/comments","review_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments/{number}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1289/comments","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/d8e6f181757268767b6bdef237d0f7bc428c7657","head":{"label":"dev_test_catalog","ref":"dev_test_catalog","sha":"d8e6f181757268767b6bdef237d0f7bc428c7657","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399553,"name":"mf-chsdi3","full_name":"geoadmin/mf-chsdi3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-chsdi3","description":"api3.geo.admin.ch source code. ","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-chsdi3","forks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/comments/{number}","contents_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/releases{/id}","created_at":"2013-05-31T06:59:44Z","updated_at":"2015-02-19T08:48:03Z","pushed_at":"2015-02-19T08:48:03Z","git_url":"git://github.com/geoadmin/mf-chsdi3.git","ssh_url":"git@github.com:geoadmin/mf-chsdi3.git","clone_url":"https://github.com/geoadmin/mf-chsdi3.git","svn_url":"https://github.com/geoadmin/mf-chsdi3","homepage":"api3.geo.admin.ch","size":225993,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":39,"forks":6,"open_issues":39,"watchers":7,"default_branch":"master"}},"base":{"label":"master","ref":"master","sha":"ea722b1205f72adb7e1f89988da799695eca187d","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399553,"name":"mf-chsdi3","full_name":"geoadmin/mf-chsdi3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-chsdi3","description":"api3.geo.admin.ch source code. ","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-chsdi3","forks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/comments/{number}","contents_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/releases{/id}","created_at":"2013-05-31T06:59:44Z","updated_at":"2015-02-19T08:48:03Z","pushed_at":"2015-02-19T08:48:03Z","git_url":"git://github.com/geoadmin/mf-chsdi3.git","ssh_url":"git@github.com:geoadmin/mf-chsdi3.git","clone_url":"https://github.com/geoadmin/mf-chsdi3.git","svn_url":"https://github.com/geoadmin/mf-chsdi3","homepage":"api3.geo.admin.ch","size":225993,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":39,"forks":6,"open_issues":39,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1289"},"html":{"href":"https://github.com/geoadmin/mf-chsdi3/pull/1289"},"issue":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1289"},"comments":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1289/comments"},"review_comments":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1289/comments"},"review_comment":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1289/commits"},"statuses":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/d8e6f181757268767b6bdef237d0f7bc428c7657"}}}}