{"action":"created","issue":{"url":"https://api.github.com/repos/rhinstaller/blivet/issues/133","labels_url":"https://api.github.com/repos/rhinstaller/blivet/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/rhinstaller/blivet/issues/133/comments","events_url":"https://api.github.com/repos/rhinstaller/blivet/issues/133/events","html_url":"https://github.com/rhinstaller/blivet/pull/133","id":81404175,"number":133,"title":"Fix tests deprecation warnings in a backward compatible way","user":{"login":"atodorov","id":1002300,"avatar_url":"https://avatars.githubusercontent.com/u/1002300?v=3","gravatar_id":"","url":"https://api.github.com/users/atodorov","html_url":"https://github.com/atodorov","followers_url":"https://api.github.com/users/atodorov/followers","following_url":"https://api.github.com/users/atodorov/following{/other_user}","gists_url":"https://api.github.com/users/atodorov/gists{/gist_id}","starred_url":"https://api.github.com/users/atodorov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atodorov/subscriptions","organizations_url":"https://api.github.com/users/atodorov/orgs","repos_url":"https://api.github.com/users/atodorov/repos","events_url":"https://api.github.com/users/atodorov/events{/privacy}","received_events_url":"https://api.github.com/users/atodorov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-27T11:10:14Z","updated_at":"2015-05-27T12:23:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rhinstaller/blivet/pulls/133","html_url":"https://github.com/rhinstaller/blivet/pull/133","diff_url":"https://github.com/rhinstaller/blivet/pull/133.diff","patch_url":"https://github.com/rhinstaller/blivet/pull/133.patch"},"body":"From the original review in PR #120\r\n\r\n@mulkieran\r\n> Please use \"with self.assertRaises\" everywhere. It's just easier on the eyes.\r\n\r\nThis doesn't work b/c assertRaises and assertRaisesRegex are different. I'm not quite sure what do you mean but directly changing one for the other doesn't seem to work.\r\n\r\n> Also, we always use six.PY2 and six.PY3 to check the python version for this kind of thing, not sys.version_info, so it's probably best to stick with that.\r\n\r\nFixed.\r\n\r\n> I think you should be able to avoid modifying the class hierarchy to deal with the versioning problem in commit 3. You might consider modifying unittest.TestCase instead, for example.\r\n\r\nLet me see how can I do this. Is there a place where I can hook into before the test cases are actually executed? If so I can monkey-patch unittest.TestCase instead of creating another base class."},"comment":{"url":"https://api.github.com/repos/rhinstaller/blivet/issues/comments/105888328","html_url":"https://github.com/rhinstaller/blivet/pull/133#issuecomment-105888328","issue_url":"https://api.github.com/repos/rhinstaller/blivet/issues/133","id":105888328,"user":{"login":"atodorov","id":1002300,"avatar_url":"https://avatars.githubusercontent.com/u/1002300?v=3","gravatar_id":"","url":"https://api.github.com/users/atodorov","html_url":"https://github.com/atodorov","followers_url":"https://api.github.com/users/atodorov/followers","following_url":"https://api.github.com/users/atodorov/following{/other_user}","gists_url":"https://api.github.com/users/atodorov/gists{/gist_id}","starred_url":"https://api.github.com/users/atodorov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atodorov/subscriptions","organizations_url":"https://api.github.com/users/atodorov/orgs","repos_url":"https://api.github.com/users/atodorov/repos","events_url":"https://api.github.com/users/atodorov/events{/privacy}","received_events_url":"https://api.github.com/users/atodorov/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T12:23:31Z","updated_at":"2015-05-27T12:23:31Z","body":"> Instead of changing the class hierarchy, could try importing unittest and assigning to TestCase methods in tests/__init__.py.\r\n\r\nThanks, I didn't actually think this will work but it did. It also fixed the labeling_test errors above.\r\n\r\n"}}