)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2a95fdeb1931c4174f40de4b9f3cd257c3a4a6e6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Cedric Brandily \u003czzelle@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-06-02 12:07:27 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve flat type driver unittests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ib56c5823ddb927d8269cfcdaa8df8b0f78dc5a6e"},{"line_number":10,"context_line":"Partial-Bug: #1269127"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1ae5cdf2_394e2d97","line":7,"updated":"2014-06-02 14:12:27.000000000","message":"add?","commit_id":"65d2dabe6cebea613444459b0e1500ad6e6b8d25"}],"neutron/tests/unit/ml2/test_type_flat.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"6293475f787187a48ace23e28e15ebca1370ab05","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        segment[api.PHYSICAL_NETWORK] \u003d \u0027other_flat_net\u0027"},{"line_number":50,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":51,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        self.driver._parse_networks(\u0027*\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_64f2c970","line":50,"updated":"2014-06-02 14:06:48.000000000","message":"I appreciate that there are examples where testtools.ExpectedException is already used, but the numbers where this happens are miniscule compared to the ones where self.assertRaises is used. I don\u0027t feel strongly about keep using testtools, but I wonder if we should unify and use a single approach for consistency.\n\nSo, as a suggestion, what about you aligned with the most used way to test for expected exceptions?","commit_id":"65d2dabe6cebea613444459b0e1500ad6e6b8d25"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a54d7964c87e8f1b46211a59161833b243858d72","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        segment[api.PHYSICAL_NETWORK] \u003d \u0027other_flat_net\u0027"},{"line_number":50,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":51,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        self.driver._parse_networks(\u0027*\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_e2ab291c","line":50,"in_reply_to":"1ae5cdf2_64f2c970","updated":"2014-06-02 14:52:50.000000000","message":"will do\n\nBut IMO testtools context is more readable then assertRaises","commit_id":"65d2dabe6cebea613444459b0e1500ad6e6b8d25"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"47ae6873a41b1f5849b6c497e5d3810ff407c72c","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        return session.query(type_flat.FlatAllocation).filter_by("},{"line_number":39,"context_line":"            physical_network\u003dsegment[api.PHYSICAL_NETWORK]).first()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def test_validate_provider_segment(self):"},{"line_number":42,"context_line":"        segment \u003d {api.NETWORK_TYPE: p_const.TYPE_FLAT}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        self.assertRaises(exc.InvalidInput,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_b864d722","line":41,"updated":"2014-06-03 07:59:30.000000000","message":"consider making separate tests for positive and negative cases","commit_id":"ace71502ae2b47a0d004f9b577d79f4b19eaa751"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"47ae6873a41b1f5849b6c497e5d3810ff407c72c","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                          self.driver.validate_provider_segment,"},{"line_number":59,"context_line":"                          segment)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def test_reserve_provider_segment(self):"},{"line_number":62,"context_line":"        segment \u003d {api.NETWORK_TYPE: p_const.TYPE_FLAT,"},{"line_number":63,"context_line":"                   api.PHYSICAL_NETWORK: \u0027flat_net1\u0027}"},{"line_number":64,"context_line":"        self.driver.reserve_provider_segment(self.session, segment)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_f86e5f00","line":61,"updated":"2014-06-03 07:59:30.000000000","message":"ditto","commit_id":"ace71502ae2b47a0d004f9b577d79f4b19eaa751"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0ca73f5283a76a6445f7bbc42f0c605c223aa62b","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                          self.driver.validate_provider_segment,"},{"line_number":59,"context_line":"                          segment)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def test_reserve_provider_segment(self):"},{"line_number":62,"context_line":"        segment \u003d {api.NETWORK_TYPE: p_const.TYPE_FLAT,"},{"line_number":63,"context_line":"                   api.PHYSICAL_NETWORK: \u0027flat_net1\u0027}"},{"line_number":64,"context_line":"        self.driver.reserve_provider_segment(self.session, segment)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_d4a96291","line":61,"in_reply_to":"1ae5cdf2_f86e5f00","updated":"2014-06-03 13:25:35.000000000","message":"I prefer not to because positive/negative tests will be the same except self.assertEqual/Raises(...) lines","commit_id":"ace71502ae2b47a0d004f9b577d79f4b19eaa751"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"8b402fa3b15c21a75d9aada25c429400e621d1a0","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        segment \u003d {api.NETWORK_TYPE: p_const.TYPE_FLAT}"},{"line_number":53,"context_line":"        self.assertRaises(exc.InvalidInput,"},{"line_number":54,"context_line":"                          self.driver.validate_provider_segment,"},{"line_number":55,"context_line":"                          segment)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        segment[api.PHYSICAL_NETWORK] \u003d \u0027other_flat_net\u0027"},{"line_number":58,"context_line":"        self.assertRaises(exc.InvalidInput,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_60c6086a","line":55,"updated":"2014-06-03 15:09:45.000000000","message":"Unittest should fail because of one specific reason. Please create a method per test.","commit_id":"b09be254677de69d05e2efd1ac4c7e9cdf7d34bf"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"514627fdfa6fac8804922dfc13fcfd7cace881d3","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                   api.PHYSICAL_NETWORK: \u0027flat_net1\u0027}"},{"line_number":44,"context_line":"        self.driver.validate_provider_segment(segment)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        self.driver._parse_networks(\u0027*\u0027)"},{"line_number":47,"context_line":"        segment \u003d {api.NETWORK_TYPE: p_const.TYPE_FLAT,"},{"line_number":48,"context_line":"                   api.PHYSICAL_NETWORK: \u0027other_flat_net\u0027}"},{"line_number":49,"context_line":"        self.driver.validate_provider_segment(segment)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_2f7bf5f5","line":46,"updated":"2014-06-04 08:45:41.000000000","message":"This should be separate test. The reason is if previous validate_provider_segment fails, the next one won\u0027t be tested.","commit_id":"4fe90af42445ad4054b2ab722a7d4f717449d464"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"514627fdfa6fac8804922dfc13fcfd7cace881d3","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                   api.PHYSICAL_NETWORK: \u0027flat_net1\u0027}"},{"line_number":75,"context_line":"        self.driver.reserve_provider_segment(self.session, segment)"},{"line_number":76,"context_line":"        alloc \u003d self._get_allocation(self.session, segment)"},{"line_number":77,"context_line":"        self.assertEqual(segment[api.PHYSICAL_NETWORK], alloc.physical_network)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        self.driver.release_segment(self.session, segment)"},{"line_number":80,"context_line":"        alloc \u003d self._get_allocation(self.session, segment)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_b8e829e3","line":77,"updated":"2014-06-04 08:45:41.000000000","message":"Same here","commit_id":"4fe90af42445ad4054b2ab722a7d4f717449d464"}]}
