GitHub PullRequestReviewCommentEvent at 2014-04-28 09:38:48
Repository: incuna-test-utils
Actor: Ian-Foote
Payload: {"comment":{"url":"https://api.github.com/repos/incuna/incuna-test-utils/pulls/comments/12040088","id":12040088,"diff_hunk":"@@ -17,9 +17,36 @@ def check_url(self, view_class, expected_url, url_name,\n         reversed_url = reverse(url_name, args=url_args, kwargs=url_kwargs)\n         self.assertEqual(reversed_url, expected_url)\n \n+        self.assertViewNames(view, expected_url)\n+\n+    def assertViewNames(self, view, expected_url):\n+        \"\"\"\n+        Assert that the view method/class that the URL resolves to is the\n+        correct one.\n+        \"\"\"\n+        pass\n+\n+\n+class URLsMixinForViewMethod(URLsMixinBase):\n+    \"\"\"For testing method-based views.\"\"\"\n+\n+    def assertViewNames(self, view_method, expected_url):\n+        resolved_view_method = resolve(expected_url).func\n+        self.assertEqual(resolved_view_method.__name__, view_method.__name__)\n+\n+\n+class URLsMixinREST(URLsMixinBase):\n+    \"\"\"For testing class-based views.\"\"\"\n+\n+    def assertViewNames(self, view_class, expected_url):\n         resolved_view_class = resolve(expected_url).func.cls\n         self.assertEqual(resolved_view_class, view_class)\n \n \n-class URLsTestCase(URLsMixin, TestCase):\n+class URLsMixin(URLsMixinREST):\n+    \"\"\"For backwards compatibility.\"\"\"\n+    pass","path":"incuna_test_utils/testcases/urls.py","position":46,"original_position":46,"commit_id":"4c789e1bf1f71c15ba5918b4b5793af5d854551d","original_commit_id":"4c789e1bf1f71c15ba5918b4b5793af5d854551d","user":{"login":"Ian-Foote","id":1843202,"avatar_url":"https://avatars.githubusercontent.com/u/1843202?","gravatar_id":"7acf168ea504f7196f32e97057f59f48","url":"https://api.github.com/users/Ian-Foote","html_url":"https://github.com/Ian-Foote","followers_url":"https://api.github.com/users/Ian-Foote/followers","following_url":"https://api.github.com/users/Ian-Foote/following{/other_user}","gists_url":"https://api.github.com/users/Ian-Foote/gists{/gist_id}","starred_url":"https://api.github.com/users/Ian-Foote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ian-Foote/subscriptions","organizations_url":"https://api.github.com/users/Ian-Foote/orgs","repos_url":"https://api.github.com/users/Ian-Foote/repos","events_url":"https://api.github.com/users/Ian-Foote/events{/privacy}","received_events_url":"https://api.github.com/users/Ian-Foote/received_events","type":"User","site_admin":false},"body":"I think \r\n```python\r\n'URLsMixin is deprecated; use URLsMixinREST instead.'\r\n```\r\nwould be better - it's more to the point.","created_at":"2014-04-28T09:38:48Z","updated_at":"2014-04-28T09:38:48Z","html_url":"https://github.com/incuna/incuna-test-utils/pull/9#discussion_r12040088","pull_request_url":"https://api.github.com/repos/incuna/incuna-test-utils/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/incuna/incuna-test-utils/pulls/comments/12040088"},"html":{"href":"https://github.com/incuna/incuna-test-utils/pull/9#discussion_r12040088"},"pull_request":{"href":"https://api.github.com/repos/incuna/incuna-test-utils/pulls/9"}}}}