{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/comments/55921333","id":55921333,"diff_hunk":"@@ -0,0 +1,23 @@\n+# This Source Code Form is subject to the terms of the Mozilla Public\n+# License, v. 2.0. If a copy of the MPL was not distributed with this\n+# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n+\n+import pytest\n+import random\n+\n+from pages.treeherder import TreeherderPage\n+\n+\n+class TestSwitchRepo:\n+\n+    @pytest.mark.nondestructive\n+    def test_switch_repo(self, base_url, selenium):\n+        \"\"\" Switch to new active watched repo \"\"\"\n+        page = TreeherderPage(base_url, selenium).open()\n+        default_watched_repo = page.active_watched_repo\n+        new_repo = page.select_random_repo\n+        assert not default_watched_repo == new_repo","path":"tests/test_switch_repo.py","position":19,"original_position":19,"commit_id":"f19eebbf1ebe0313a4ab048f5b62d58a881b50f1","original_commit_id":"f19eebbf1ebe0313a4ab048f5b62d58a881b50f1","user":{"login":"davehunt","id":122800,"avatar_url":"https://avatars.githubusercontent.com/u/122800?v=3","gravatar_id":"","url":"https://api.github.com/users/davehunt","html_url":"https://github.com/davehunt","followers_url":"https://api.github.com/users/davehunt/followers","following_url":"https://api.github.com/users/davehunt/following{/other_user}","gists_url":"https://api.github.com/users/davehunt/gists{/gist_id}","starred_url":"https://api.github.com/users/davehunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davehunt/subscriptions","organizations_url":"https://api.github.com/users/davehunt/orgs","repos_url":"https://api.github.com/users/davehunt/repos","events_url":"https://api.github.com/users/davehunt/events{/privacy}","received_events_url":"https://api.github.com/users/davehunt/received_events","type":"User","site_admin":false},"body":"From our [styleguide](https://wiki.mozilla.org/QA/Execution/Web_Testing/Docs/Automation/StyleGuide#Assertions):\r\n\r\n> When doing negative equivalency, use != and put the unexpected value first, followed by the actual value\r\n\r\nSo this would be `assert default_watched_repo != new_repo`","created_at":"2016-03-12T13:16:00Z","updated_at":"2016-03-12T13:16:00Z","html_url":"https://github.com/mozilla/treeherder-tests/pull/35#discussion_r55921333","pull_request_url":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/comments/55921333"},"html":{"href":"https://github.com/mozilla/treeherder-tests/pull/35#discussion_r55921333"},"pull_request":{"href":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/35","id":62462714,"html_url":"https://github.com/mozilla/treeherder-tests/pull/35","diff_url":"https://github.com/mozilla/treeherder-tests/pull/35.diff","patch_url":"https://github.com/mozilla/treeherder-tests/pull/35.patch","issue_url":"https://api.github.com/repos/mozilla/treeherder-tests/issues/35","number":35,"state":"open","locked":false,"title":"Added tests for switching repos, fixes #7","user":{"login":"rbillings","id":737878,"avatar_url":"https://avatars.githubusercontent.com/u/737878?v=3","gravatar_id":"","url":"https://api.github.com/users/rbillings","html_url":"https://github.com/rbillings","followers_url":"https://api.github.com/users/rbillings/followers","following_url":"https://api.github.com/users/rbillings/following{/other_user}","gists_url":"https://api.github.com/users/rbillings/gists{/gist_id}","starred_url":"https://api.github.com/users/rbillings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbillings/subscriptions","organizations_url":"https://api.github.com/users/rbillings/orgs","repos_url":"https://api.github.com/users/rbillings/repos","events_url":"https://api.github.com/users/rbillings/events{/privacy}","received_events_url":"https://api.github.com/users/rbillings/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-10T21:55:49Z","updated_at":"2016-03-12T13:16:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"28f7ae5b98a41bf1266882fcccfd538b5b8cafc9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/35/commits","review_comments_url":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/35/comments","review_comment_url":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/treeherder-tests/issues/35/comments","statuses_url":"https://api.github.com/repos/mozilla/treeherder-tests/statuses/f19eebbf1ebe0313a4ab048f5b62d58a881b50f1","head":{"label":"rbillings:switchrepo","ref":"switchrepo","sha":"f19eebbf1ebe0313a4ab048f5b62d58a881b50f1","user":{"login":"rbillings","id":737878,"avatar_url":"https://avatars.githubusercontent.com/u/737878?v=3","gravatar_id":"","url":"https://api.github.com/users/rbillings","html_url":"https://github.com/rbillings","followers_url":"https://api.github.com/users/rbillings/followers","following_url":"https://api.github.com/users/rbillings/following{/other_user}","gists_url":"https://api.github.com/users/rbillings/gists{/gist_id}","starred_url":"https://api.github.com/users/rbillings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbillings/subscriptions","organizations_url":"https://api.github.com/users/rbillings/orgs","repos_url":"https://api.github.com/users/rbillings/repos","events_url":"https://api.github.com/users/rbillings/events{/privacy}","received_events_url":"https://api.github.com/users/rbillings/received_events","type":"User","site_admin":false},"repo":{"id":34342799,"name":"treeherder-tests","full_name":"rbillings/treeherder-tests","owner":{"login":"rbillings","id":737878,"avatar_url":"https://avatars.githubusercontent.com/u/737878?v=3","gravatar_id":"","url":"https://api.github.com/users/rbillings","html_url":"https://github.com/rbillings","followers_url":"https://api.github.com/users/rbillings/followers","following_url":"https://api.github.com/users/rbillings/following{/other_user}","gists_url":"https://api.github.com/users/rbillings/gists{/gist_id}","starred_url":"https://api.github.com/users/rbillings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbillings/subscriptions","organizations_url":"https://api.github.com/users/rbillings/orgs","repos_url":"https://api.github.com/users/rbillings/repos","events_url":"https://api.github.com/users/rbillings/events{/privacy}","received_events_url":"https://api.github.com/users/rbillings/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rbillings/treeherder-tests","description":"Website automation for Treeherder https://github.com/mozilla/treeherder-service","fork":true,"url":"https://api.github.com/repos/rbillings/treeherder-tests","forks_url":"https://api.github.com/repos/rbillings/treeherder-tests/forks","keys_url":"https://api.github.com/repos/rbillings/treeherder-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rbillings/treeherder-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rbillings/treeherder-tests/teams","hooks_url":"https://api.github.com/repos/rbillings/treeherder-tests/hooks","issue_events_url":"https://api.github.com/repos/rbillings/treeherder-tests/issues/events{/number}","events_url":"https://api.github.com/repos/rbillings/treeherder-tests/events","assignees_url":"https://api.github.com/repos/rbillings/treeherder-tests/assignees{/user}","branches_url":"https://api.github.com/repos/rbillings/treeherder-tests/branches{/branch}","tags_url":"https://api.github.com/repos/rbillings/treeherder-tests/tags","blobs_url":"https://api.github.com/repos/rbillings/treeherder-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rbillings/treeherder-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rbillings/treeherder-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/rbillings/treeherder-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rbillings/treeherder-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/rbillings/treeherder-tests/languages","stargazers_url":"https://api.github.com/repos/rbillings/treeherder-tests/stargazers","contributors_url":"https://api.github.com/repos/rbillings/treeherder-tests/contributors","subscribers_url":"https://api.github.com/repos/rbillings/treeherder-tests/subscribers","subscription_url":"https://api.github.com/repos/rbillings/treeherder-tests/subscription","commits_url":"https://api.github.com/repos/rbillings/treeherder-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/rbillings/treeherder-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/rbillings/treeherder-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/rbillings/treeherder-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/rbillings/treeherder-tests/contents/{+path}","compare_url":"https://api.github.com/repos/rbillings/treeherder-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rbillings/treeherder-tests/merges","archive_url":"https://api.github.com/repos/rbillings/treeherder-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rbillings/treeherder-tests/downloads","issues_url":"https://api.github.com/repos/rbillings/treeherder-tests/issues{/number}","pulls_url":"https://api.github.com/repos/rbillings/treeherder-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/rbillings/treeherder-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/rbillings/treeherder-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rbillings/treeherder-tests/labels{/name}","releases_url":"https://api.github.com/repos/rbillings/treeherder-tests/releases{/id}","deployments_url":"https://api.github.com/repos/rbillings/treeherder-tests/deployments","created_at":"2015-04-21T17:47:53Z","updated_at":"2015-04-21T17:32:38Z","pushed_at":"2016-03-11T21:29:16Z","git_url":"git://github.com/rbillings/treeherder-tests.git","ssh_url":"git@github.com:rbillings/treeherder-tests.git","clone_url":"https://github.com/rbillings/treeherder-tests.git","svn_url":"https://github.com/rbillings/treeherder-tests","homepage":null,"size":51,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"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":"mozilla:master","ref":"master","sha":"85a6842b73fbbc2149c72631f864070d53363a63","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":33736657,"name":"treeherder-tests","full_name":"mozilla/treeherder-tests","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/treeherder-tests","description":"Website automation for Treeherder https://github.com/mozilla/treeherder-service","fork":false,"url":"https://api.github.com/repos/mozilla/treeherder-tests","forks_url":"https://api.github.com/repos/mozilla/treeherder-tests/forks","keys_url":"https://api.github.com/repos/mozilla/treeherder-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/treeherder-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/treeherder-tests/teams","hooks_url":"https://api.github.com/repos/mozilla/treeherder-tests/hooks","issue_events_url":"https://api.github.com/repos/mozilla/treeherder-tests/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/treeherder-tests/events","assignees_url":"https://api.github.com/repos/mozilla/treeherder-tests/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/treeherder-tests/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/treeherder-tests/tags","blobs_url":"https://api.github.com/repos/mozilla/treeherder-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/treeherder-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/treeherder-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/treeherder-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/treeherder-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/treeherder-tests/languages","stargazers_url":"https://api.github.com/repos/mozilla/treeherder-tests/stargazers","contributors_url":"https://api.github.com/repos/mozilla/treeherder-tests/contributors","subscribers_url":"https://api.github.com/repos/mozilla/treeherder-tests/subscribers","subscription_url":"https://api.github.com/repos/mozilla/treeherder-tests/subscription","commits_url":"https://api.github.com/repos/mozilla/treeherder-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/treeherder-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/treeherder-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/treeherder-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/treeherder-tests/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/treeherder-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/treeherder-tests/merges","archive_url":"https://api.github.com/repos/mozilla/treeherder-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/treeherder-tests/downloads","issues_url":"https://api.github.com/repos/mozilla/treeherder-tests/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/treeherder-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/treeherder-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/treeherder-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/treeherder-tests/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/treeherder-tests/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/treeherder-tests/deployments","created_at":"2015-04-10T15:45:57Z","updated_at":"2016-02-10T22:27:12Z","pushed_at":"2016-03-11T21:29:17Z","git_url":"git://github.com/mozilla/treeherder-tests.git","ssh_url":"git@github.com:mozilla/treeherder-tests.git","clone_url":"https://github.com/mozilla/treeherder-tests.git","svn_url":"https://github.com/mozilla/treeherder-tests","homepage":null,"size":37,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/35"},"html":{"href":"https://github.com/mozilla/treeherder-tests/pull/35"},"issue":{"href":"https://api.github.com/repos/mozilla/treeherder-tests/issues/35"},"comments":{"href":"https://api.github.com/repos/mozilla/treeherder-tests/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/treeherder-tests/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/treeherder-tests/statuses/f19eebbf1ebe0313a4ab048f5b62d58a881b50f1"}}}}