)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"5d743a8035ca60851f54bd8056e512143332cd1e","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Replace assertDictMatch with assertDictEqual method in tests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"assertDictMatch was introduced for Python 2.6 only. Python 2.7+ contains assertDictEqual."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: #1646433"},{"line_number":12,"context_line":"Change-Id: I41738cc0bd90656508fc6ff390072b55130cc6fc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ee35ae0d_c81b4876","line":9,"updated":"2021-06-14 17:31:37.000000000","message":"Wrap commit message to 80 chars","commit_id":"29248c494b964b1ac5e862d02d2e56e3420579b6"},{"author":{"_account_id":33380,"name":"Archana Kumari","display_name":"Archana Kumari","email":"ak31960466@gmail.com","username":"archanaserver"},"change_message_id":"69a2b7b3b650a0639a7da204e1cff32c7177d3e1","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Replace assertDictMatch with assertDictEqual method in tests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"assertDictMatch was introduced for Python 2.6 only. Python 2.7+ contains assertDictEqual."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: #1646433"},{"line_number":12,"context_line":"Change-Id: I41738cc0bd90656508fc6ff390072b55130cc6fc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ec0b7168_88041f9c","line":9,"in_reply_to":"ee35ae0d_c81b4876","updated":"2021-06-29 22:25:08.000000000","message":"Done","commit_id":"29248c494b964b1ac5e862d02d2e56e3420579b6"}],"manila/test.py":[{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"5d743a8035ca60851f54bd8056e512143332cd1e","unresolved":true,"context_lines":[{"line_number":248,"context_line":"        return new_val"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    # Useful assertions"},{"line_number":251,"context_line":"    def assertDictEqual(self, d1, d2, approx_equal\u003dFalse, tolerance\u003d0.001):"},{"line_number":252,"context_line":"        \"\"\"Assert two dicts are equivalent."},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        This is a \u0027deep\u0027 match in the sense that it handles nested"}],"source_content_type":"text/x-python","patch_set":2,"id":"4486b53e_4f01e6f5","line":251,"updated":"2021-06-14 17:31:37.000000000","message":"Remove this function altogether\n\nSince we will be using assertDictEqual() that is built in the python stdlib we want to get rid of this function here","commit_id":"29248c494b964b1ac5e862d02d2e56e3420579b6"},{"author":{"_account_id":33380,"name":"Archana Kumari","display_name":"Archana Kumari","email":"ak31960466@gmail.com","username":"archanaserver"},"change_message_id":"69a2b7b3b650a0639a7da204e1cff32c7177d3e1","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        return new_val"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    # Useful assertions"},{"line_number":251,"context_line":"    def assertDictEqual(self, d1, d2, approx_equal\u003dFalse, tolerance\u003d0.001):"},{"line_number":252,"context_line":"        \"\"\"Assert two dicts are equivalent."},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        This is a \u0027deep\u0027 match in the sense that it handles nested"}],"source_content_type":"text/x-python","patch_set":2,"id":"43246dca_c32d378d","line":251,"in_reply_to":"4486b53e_4f01e6f5","updated":"2021-06-29 22:25:08.000000000","message":"Done","commit_id":"29248c494b964b1ac5e862d02d2e56e3420579b6"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"f196673e66e4213c7e9aacedc764d51b190038fb","unresolved":true,"context_lines":[{"line_number":247,"context_line":"        self.addCleanup(patcher.stop)"},{"line_number":248,"context_line":"        return new_val"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def assertDictListMatch(self, L1, L2, approx_equal\u003dFalse, tolerance\u003d0.001):"},{"line_number":251,"context_line":"        \"\"\"Assert a list of dicts are equivalent.\"\"\""},{"line_number":252,"context_line":"        def raise_assertion(msg):"},{"line_number":253,"context_line":"            L1str \u003d str(L1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fddaa7b9_231c308d","line":250,"updated":"2021-06-17 08:45:04.000000000","message":"Since this is an internally used function (no user will be consuming this) we should be safe to remove the approx_equal and tolerance params from the signature, without performing further actions.\n\n@Goutham what do you think about this? Should we follow some deprecation procedure?","commit_id":"9d9d7ce832d2084f804db373a3d450730dcb738d"},{"author":{"_account_id":33380,"name":"Archana Kumari","display_name":"Archana Kumari","email":"ak31960466@gmail.com","username":"archanaserver"},"change_message_id":"69a2b7b3b650a0639a7da204e1cff32c7177d3e1","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        self.addCleanup(patcher.stop)"},{"line_number":248,"context_line":"        return new_val"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def assertDictListMatch(self, L1, L2, approx_equal\u003dFalse, tolerance\u003d0.001):"},{"line_number":251,"context_line":"        \"\"\"Assert a list of dicts are equivalent.\"\"\""},{"line_number":252,"context_line":"        def raise_assertion(msg):"},{"line_number":253,"context_line":"            L1str \u003d str(L1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"2b0f9a4f_b41dfe19","line":250,"in_reply_to":"46c85acf_c5515f99","updated":"2021-06-29 22:25:08.000000000","message":"Done","commit_id":"9d9d7ce832d2084f804db373a3d450730dcb738d"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"0e66501739ce55714c35fc018f83b22e9ae44042","unresolved":true,"context_lines":[{"line_number":247,"context_line":"        self.addCleanup(patcher.stop)"},{"line_number":248,"context_line":"        return new_val"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def assertDictListMatch(self, L1, L2, approx_equal\u003dFalse, tolerance\u003d0.001):"},{"line_number":251,"context_line":"        \"\"\"Assert a list of dicts are equivalent.\"\"\""},{"line_number":252,"context_line":"        def raise_assertion(msg):"},{"line_number":253,"context_line":"            L1str \u003d str(L1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"46c85acf_c5515f99","line":250,"in_reply_to":"fddaa7b9_231c308d","updated":"2021-06-23 01:39:06.000000000","message":"thanks for checking - nope; no need to follow any deprecation procedure. Lets rip this out if its unused/dead code","commit_id":"9d9d7ce832d2084f804db373a3d450730dcb738d"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"f196673e66e4213c7e9aacedc764d51b190038fb","unresolved":true,"context_lines":[{"line_number":265,"context_line":"                            {\"L1count\": L1count, \"L2count\": L2count})"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        for d1, d2 in zip(L1, L2):"},{"line_number":268,"context_line":"            self.assertDictEqual(d1, d2, approx_equal\u003dapprox_equal,"},{"line_number":269,"context_line":"                                 tolerance\u003dtolerance)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def assertSubDictMatch(self, sub_dict, super_dict):"}],"source_content_type":"text/x-python","patch_set":3,"id":"6a72d4ca_c1150962","line":268,"updated":"2021-06-17 08:45:04.000000000","message":"assertDictEqual() signature expects only d1 and d2, we need to remove approx_equal and tolerance params since those were used by assertDictMatch(), which we are removing.\n\nThis also means that you will need to look into the code and look for assertDictListMatch usage, and remove if we are passing aprox_equal or tolerance params.","commit_id":"9d9d7ce832d2084f804db373a3d450730dcb738d"},{"author":{"_account_id":33380,"name":"Archana Kumari","display_name":"Archana Kumari","email":"ak31960466@gmail.com","username":"archanaserver"},"change_message_id":"69a2b7b3b650a0639a7da204e1cff32c7177d3e1","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                            {\"L1count\": L1count, \"L2count\": L2count})"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        for d1, d2 in zip(L1, L2):"},{"line_number":268,"context_line":"            self.assertDictEqual(d1, d2, approx_equal\u003dapprox_equal,"},{"line_number":269,"context_line":"                                 tolerance\u003dtolerance)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def assertSubDictMatch(self, sub_dict, super_dict):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7401c1_7adbdc90","line":268,"in_reply_to":"6a72d4ca_c1150962","updated":"2021-06-29 22:25:08.000000000","message":"Done","commit_id":"9d9d7ce832d2084f804db373a3d450730dcb738d"}],"manila/tests/db/sqlalchemy/test_api.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"ef68341e96a409dfb4ab7d430021c904de39ceae","unresolved":true,"context_lines":[{"line_number":1240,"context_line":"        sg \u003d db_utils.create_share_group()"},{"line_number":1241,"context_line":"        sg_snap \u003d db_utils.create_share_group_snapshot(sg[\u0027id\u0027])"},{"line_number":1242,"context_line":""},{"line_number":1243,"context_line":"        self.assertDictEqual("},{"line_number":1244,"context_line":"            dict(sg_snap),"},{"line_number":1245,"context_line":"            dict(db_api.share_group_snapshot_get(self.ctxt, sg_snap[\u0027id\u0027])))"},{"line_number":1246,"context_line":""},{"line_number":1247,"context_line":"    def test_share_group_snapshot_get_all(self):"},{"line_number":1248,"context_line":"        sg \u003d db_utils.create_share_group()"}],"source_content_type":"text/x-python","patch_set":5,"id":"959f8459_b2e3f8c9","line":1245,"range":{"start_line":1243,"start_character":8,"end_line":1245,"end_character":76},"updated":"2021-07-03 02:26:42.000000000","message":"here sg_snap has a member \"share_group\" which is really a sqlalchemy model;\n\nso lets try this:\n\n\n sg_snap_source_group \u003d dict(sg_snap.pop(\u0027share_group\u0027, {}))\n get_sg_snap \u003d db_api.share_group_snapshot_get(self.ctxt, sg_snap[\u0027id\u0027])\n get_sg_snap_source_group \u003d dict(get_sg_snap_source_group.pop(\u0027share_group\u0027, {}))\n \n self.assertDictEqual(dict(sg_snap), dict(get_sg_snap))\n self.assertDictEqual(sg_snap_source_group, get_sg_snap_source_group)","commit_id":"1436020a936aa568d8ee1df5a504f93b02af6981"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"5b3437d1f8e3478094e70069a3c005175c3bb115","unresolved":true,"context_lines":[{"line_number":1240,"context_line":"        sg \u003d db_utils.create_share_group()"},{"line_number":1241,"context_line":"        sg_snap \u003d db_utils.create_share_group_snapshot(sg[\u0027id\u0027])"},{"line_number":1242,"context_line":""},{"line_number":1243,"context_line":"        self.assertDictEqual("},{"line_number":1244,"context_line":"            dict(sg_snap),"},{"line_number":1245,"context_line":"            dict(db_api.share_group_snapshot_get(self.ctxt, sg_snap[\u0027id\u0027])))"},{"line_number":1246,"context_line":""},{"line_number":1247,"context_line":"    def test_share_group_snapshot_get_all(self):"},{"line_number":1248,"context_line":"        sg \u003d db_utils.create_share_group()"}],"source_content_type":"text/x-python","patch_set":5,"id":"62e75e13_0d89ab90","line":1245,"range":{"start_line":1243,"start_character":8,"end_line":1245,"end_character":76},"in_reply_to":"959f8459_b2e3f8c9","updated":"2021-07-05 07:49:36.000000000","message":"+1\n\nThis is what we discussed last week :) We need to drop the sqlalchemy model in those dicts and compare the rest of the attributes. The sqlalchemy model will be different and it\u0027s ok it is like that.","commit_id":"1436020a936aa568d8ee1df5a504f93b02af6981"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"e1727fc75d96d20ca7c778a8257c0c59ee1f6866","unresolved":true,"context_lines":[{"line_number":1241,"context_line":"        sg_snap \u003d db_utils.create_share_group_snapshot(sg[\u0027id\u0027])"},{"line_number":1242,"context_line":"        sg_snap_source_group \u003d dict(sg_snap.pop(\u0027share_group\u0027, {}))"},{"line_number":1243,"context_line":"        get_sg_snap \u003d db_api.share_group_snapshot_get(self.ctxt, sg_snap[\u0027id\u0027])"},{"line_number":1244,"context_line":"        get_sg_snap_source_group \u003d dict(get_sg_snap_source_group.pop("},{"line_number":1245,"context_line":"            \u0027share_group\u0027, {}))"},{"line_number":1246,"context_line":""},{"line_number":1247,"context_line":"        self.assertDictEqual(dict(sg_snap), dict(get_sg_snap))"}],"source_content_type":"text/x-python","patch_set":7,"id":"b65c3590_4309276f","line":1244,"in_reply_to":"677f71cb_85a6c86b","updated":"2021-07-06 07:55:01.000000000","message":"\u003e pep8: F821 undefined name \u0027get_sg_snap_source_group\u0027\n\nThe line should be \"get_sg_snap_source_group \u003d dict(sg_snap_source_group.pop(\u0027share_group\u0027, {}))","commit_id":"1e204b1a97cd42771ee6e965c19c17480e7e35f3"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"124122d11153eb1e6b7435c99d742fe4d2d3b1df","unresolved":true,"context_lines":[{"line_number":1237,"context_line":"        self.assertEqual(2, count)"},{"line_number":1238,"context_line":""},{"line_number":1239,"context_line":"    def test_share_group_snapshot_get(self):"},{"line_number":1240,"context_line":"        sg \u003d db_utils.create_share_group()"},{"line_number":1241,"context_line":"        sg_snap \u003d db_utils.create_share_group_snapshot(sg[\u0027id\u0027])"},{"line_number":1242,"context_line":"        sg_snap_source_group \u003d dict(sg_snap).pop(\u0027share_group\u0027, {})"},{"line_number":1243,"context_line":"        get_sg_snap \u003d db_api.share_group_snapshot_get(self.ctxt, sg_snap[\u0027id\u0027])"},{"line_number":1244,"context_line":"        get_sg_snap_source_group \u003d dict(get_sg_snap).pop(\u0027share_group\u0027, {})"},{"line_number":1245,"context_line":""},{"line_number":1246,"context_line":"        self.assertDictEqual(dict(sg_snap_source_group),"},{"line_number":1247,"context_line":"                             dict(get_sg_snap_source_group))"},{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"    def test_share_group_snapshot_get_all(self):"},{"line_number":1250,"context_line":"        sg \u003d db_utils.create_share_group()"}],"source_content_type":"text/x-python","patch_set":9,"id":"6dce1eb0_582b2514","line":1247,"range":{"start_line":1240,"start_character":8,"end_line":1247,"end_character":60},"updated":"2021-07-07 22:20:07.000000000","message":"couple of minor issues here; you\u0027re missing an assert:\n\n  self.assertDictEqual(dict(sg_snap), dict(get_sg_snap))\n\n\nAlso, take a look at the tests in this file, there\u0027s a subtle convention that enhances readability. \n\n    def test_something_cool(*args, **kwargs):\n        # Some test setup\n        \n        # Executing the method that\u0027s being tested\n\n        # Assertions\n\n\n\n\n \n\nSo, basically separating these logical sections with a blank-line. In your case, this test could be re-written as:\n\n\n\n    def test_share_group_snapshot_get(self):\n        sg \u003d db_utils.create_share_group()\n        sg_snap \u003d db_utils.create_share_group_snapshot(sg[\u0027id\u0027])\n        sg_snap_source_group \u003d dict(sg_snap).pop(\u0027share_group\u0027, {})\n\n        get_sg_snap \u003d db_api.share_group_snapshot_get(self.ctxt, sg_snap[\u0027id\u0027])\n\n        get_sg_snap_source_group \u003d dict(get_sg_snap).pop(\u0027share_group\u0027, {})\n        self.assertDictEqual(dict(sg_snap), dict(get_sg_snap))\n        self.assertDictEqual(dict(sg_snap_source_group),\n                             dict(get_sg_snap_source_group))","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"5d56fa9d71e037bc0992aafc70f32b7b53f27f61","unresolved":true,"context_lines":[{"line_number":1237,"context_line":"        self.assertEqual(2, count)"},{"line_number":1238,"context_line":""},{"line_number":1239,"context_line":"    def test_share_group_snapshot_get(self):"},{"line_number":1240,"context_line":"        sg \u003d db_utils.create_share_group()"},{"line_number":1241,"context_line":"        sg_snap \u003d db_utils.create_share_group_snapshot(sg[\u0027id\u0027])"},{"line_number":1242,"context_line":"        sg_snap_source_group \u003d dict(sg_snap).pop(\u0027share_group\u0027, {})"},{"line_number":1243,"context_line":"        get_sg_snap \u003d db_api.share_group_snapshot_get(self.ctxt, sg_snap[\u0027id\u0027])"},{"line_number":1244,"context_line":"        get_sg_snap_source_group \u003d dict(get_sg_snap).pop(\u0027share_group\u0027, {})"},{"line_number":1245,"context_line":""},{"line_number":1246,"context_line":"        self.assertDictEqual(dict(sg_snap_source_group),"},{"line_number":1247,"context_line":"                             dict(get_sg_snap_source_group))"},{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"    def test_share_group_snapshot_get_all(self):"},{"line_number":1250,"context_line":"        sg \u003d db_utils.create_share_group()"}],"source_content_type":"text/x-python","patch_set":9,"id":"c3f51955_9f638e26","line":1247,"range":{"start_line":1240,"start_character":8,"end_line":1247,"end_character":60},"in_reply_to":"6dce1eb0_582b2514","updated":"2021-07-08 14:34:07.000000000","message":"+1","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"8c69c26326c2cabbfeef9ffd46b30594c770c65c","unresolved":true,"context_lines":[{"line_number":1237,"context_line":"        self.assertEqual(2, count)"},{"line_number":1238,"context_line":""},{"line_number":1239,"context_line":"    def test_share_group_snapshot_get(self):"},{"line_number":1240,"context_line":"        sg \u003d db_utils.create_share_group()"},{"line_number":1241,"context_line":"        sg_snap \u003d db_utils.create_share_group_snapshot(sg[\u0027id\u0027])"},{"line_number":1242,"context_line":"        sg_snap_source_group \u003d dict(sg_snap).pop(\u0027share_group\u0027, {})"},{"line_number":1243,"context_line":"        get_sg_snap \u003d db_api.share_group_snapshot_get(self.ctxt, sg_snap[\u0027id\u0027])"},{"line_number":1244,"context_line":"        get_sg_snap_source_group \u003d dict(get_sg_snap).pop(\u0027share_group\u0027, {})"},{"line_number":1245,"context_line":""},{"line_number":1246,"context_line":"        self.assertDictEqual(dict(sg_snap_source_group),"},{"line_number":1247,"context_line":"                             dict(get_sg_snap_source_group))"},{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"    def test_share_group_snapshot_get_all(self):"},{"line_number":1250,"context_line":"        sg \u003d db_utils.create_share_group()"}],"source_content_type":"text/x-python","patch_set":9,"id":"5485672a_977cd624","line":1247,"range":{"start_line":1240,"start_character":8,"end_line":1247,"end_character":60},"in_reply_to":"c3f51955_9f638e26","updated":"2021-07-12 16:54:06.000000000","message":"Rewrite, ignore comments - they\u0027re providing more details to you:\n\n  def test_share_group_snapshot_get(self):\n        sg \u003d db_utils.create_share_group()\n        expected_sg_snap \u003d dict(db_utils.create_share_group_snapshot(sg[\u0027id\u0027]))\n        sg_snap_source_group \u003d expected_sg_snap.pop(\u0027share_group\u0027, {})\n\n \n        get_sg_snap \u003d db_api.share_group_snapshot_get(self.ctxt, expected_sg_snap[\u0027id\u0027])\n \n \n        # converting to a dict for primitive comparisons\n        get_sg_snap \u003d dict(get_sg_snap)\n        get_sg_snap_source_group \u003d get_sg_snap.pop(\u0027share_group\u0027, {})\n        # comparing the source/parent share groups for these snapshot objects\n        self.assertDictEqual(dict(sg_snap_source_group),\n                             dict(get_sg_snap_source_group))\n        # comparing the snapshot objects themselves\n        self.assertDictEqual(expected_sg_snap, get_sg_snap)","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"124122d11153eb1e6b7435c99d742fe4d2d3b1df","unresolved":true,"context_lines":[{"line_number":1268,"context_line":"        self.assertEqual(1, len(snaps))"},{"line_number":1269,"context_line":"        snap \u003d snaps[0]"},{"line_number":1270,"context_line":"        get_sg_snap_source \u003d dict(snap).pop(\u0027share_group\u0027, {})"},{"line_number":1271,"context_line":"        self.assertDictEqual("},{"line_number":1272,"context_line":"            dict(sg_snap_source_group), dict(get_sg_snap_source))"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"    def test_share_group_snapshot_get_all_by_project(self):"},{"line_number":1275,"context_line":"        fake_project \u003d uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":9,"id":"ea143e6a_7328e3d3","line":1272,"range":{"start_line":1271,"start_character":8,"end_line":1272,"end_character":65},"updated":"2021-07-07 22:20:07.000000000","message":"assert the parent structures too:\n\n    self.assertDictEqual(dict(expected_sg_snap), dict(snap))","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3476b613e2c277af26169a85cf15f4d217a817ad","unresolved":true,"context_lines":[{"line_number":1268,"context_line":"        self.assertEqual(1, len(snaps))"},{"line_number":1269,"context_line":"        snap \u003d snaps[0]"},{"line_number":1270,"context_line":"        get_sg_snap_source \u003d dict(snap).pop(\u0027share_group\u0027, {})"},{"line_number":1271,"context_line":"        self.assertDictEqual("},{"line_number":1272,"context_line":"            dict(sg_snap_source_group), dict(get_sg_snap_source))"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"    def test_share_group_snapshot_get_all_by_project(self):"},{"line_number":1275,"context_line":"        fake_project \u003d uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":9,"id":"ce29fa6d_85759d9f","line":1272,"range":{"start_line":1271,"start_character":8,"end_line":1272,"end_character":65},"in_reply_to":"11a23ec1_8afef48e","updated":"2021-07-09 04:32:50.000000000","message":"Previously dict(expected_sg_snap) was doing a shallow dict conversion; i.e., it was leaving the \"share_group\" member as a sqlalchemy object. \n\ndict(expected_sg_snap) is going to now be a primitive after popping the share_group member. \n\nI was asking to assert the parent structures because that\u0027s the intent of the test here.. We want to make sure that the share group snapshot we created on line 1263 is the same snapshot we get back on line 1266.","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"cb2ee2db8b2daf742010f3e4254c10c70ae66a30","unresolved":true,"context_lines":[{"line_number":1268,"context_line":"        self.assertEqual(1, len(snaps))"},{"line_number":1269,"context_line":"        snap \u003d snaps[0]"},{"line_number":1270,"context_line":"        get_sg_snap_source \u003d dict(snap).pop(\u0027share_group\u0027, {})"},{"line_number":1271,"context_line":"        self.assertDictEqual("},{"line_number":1272,"context_line":"            dict(sg_snap_source_group), dict(get_sg_snap_source))"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"    def test_share_group_snapshot_get_all_by_project(self):"},{"line_number":1275,"context_line":"        fake_project \u003d uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":9,"id":"dcdc7721_7952d57b","line":1272,"range":{"start_line":1271,"start_character":8,"end_line":1272,"end_character":65},"in_reply_to":"6646c0e6_63e4d9d8","updated":"2021-07-12 17:00:10.000000000","message":"+1 makes sense\n\nWe could use del() indeed, but I don\u0027t have a strong preference.\n\nThanks for clarifying!","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"8c69c26326c2cabbfeef9ffd46b30594c770c65c","unresolved":true,"context_lines":[{"line_number":1268,"context_line":"        self.assertEqual(1, len(snaps))"},{"line_number":1269,"context_line":"        snap \u003d snaps[0]"},{"line_number":1270,"context_line":"        get_sg_snap_source \u003d dict(snap).pop(\u0027share_group\u0027, {})"},{"line_number":1271,"context_line":"        self.assertDictEqual("},{"line_number":1272,"context_line":"            dict(sg_snap_source_group), dict(get_sg_snap_source))"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"    def test_share_group_snapshot_get_all_by_project(self):"},{"line_number":1275,"context_line":"        fake_project \u003d uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":9,"id":"6646c0e6_63e4d9d8","line":1272,"range":{"start_line":1271,"start_character":8,"end_line":1272,"end_character":65},"in_reply_to":"9c60567d_78df4a23","updated":"2021-07-12 16:54:06.000000000","message":"\u003e I\u0027m afraid that the parent structure is not changed, even after doing the casting to dict and performing the pop operation on it to discard the share-group attribute.\n\nI see; we could\u0027ve used \"del\" to discard the element - i was hoping the ref is updated with dict.pop, bit it looks like the dict conversion is a shallow copy of the object itself and the \"pop\" is affecting this shallow copy and not the original object - which makes sense now. \n\n\n\u003e With the assertion we are doing now we are still comparing the parent structures, but without the conflicting attribute.\n\nNope, the comparison here is happening for the objects being popped out; can we rewrite this test like this:\n\n  sg \u003d db_utils.create_share_group()\n  expected_sg_snap \u003d dict(db_utils.create_share_group_snapshot(sg[\u0027id\u0027]))\n  sg_snap_source_group \u003d expected_sg_snap.pop(\u0027share_group\u0027, {})\n\n  snaps \u003d db_api.share_group_snapshot_get_all(self.ctxt, detailed\u003dTrue)\n\n  self.assertEqual(1, len(snaps))\n  actual_sg_snap \u003d dict(snaps[0])\n  get_sg_snap_source \u003d actual_sg_snap.pop(\u0027share_group\u0027, {})\n  # comparing the source/parent share groups for these snapshot objects\n  self.assertDictEqual(\n     dict(sg_snap_source_group), dict(get_sg_snap_source))\n  # comparing the snapshot objects themselves\n  self.assertDictEqual(expected_sg_snap, actual_sg_snap)","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"cb01567e7a9ae9dddc0602362b6f2f15215ea9e1","unresolved":true,"context_lines":[{"line_number":1268,"context_line":"        self.assertEqual(1, len(snaps))"},{"line_number":1269,"context_line":"        snap \u003d snaps[0]"},{"line_number":1270,"context_line":"        get_sg_snap_source \u003d dict(snap).pop(\u0027share_group\u0027, {})"},{"line_number":1271,"context_line":"        self.assertDictEqual("},{"line_number":1272,"context_line":"            dict(sg_snap_source_group), dict(get_sg_snap_source))"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"    def test_share_group_snapshot_get_all_by_project(self):"},{"line_number":1275,"context_line":"        fake_project \u003d uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":9,"id":"9c60567d_78df4a23","line":1272,"range":{"start_line":1271,"start_character":8,"end_line":1272,"end_character":65},"in_reply_to":"ce29fa6d_85759d9f","updated":"2021-07-12 16:20:02.000000000","message":"I\u0027m afraid that the parent structure is not changed, even after doing the casting to dict and performing the pop operation on it to discard the share-group attribute.\n\nsg_snap_source_group is the result of popping the share-group attribute, but it still is a sqlalchemy model object type.\n\nSame thing happens with the snapshot we get back on line 1266 (actually, line 1269).\n\nWith the assertion we are doing now we are still comparing the parent structures, but without the conflicting attribute.","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"5d56fa9d71e037bc0992aafc70f32b7b53f27f61","unresolved":true,"context_lines":[{"line_number":1268,"context_line":"        self.assertEqual(1, len(snaps))"},{"line_number":1269,"context_line":"        snap \u003d snaps[0]"},{"line_number":1270,"context_line":"        get_sg_snap_source \u003d dict(snap).pop(\u0027share_group\u0027, {})"},{"line_number":1271,"context_line":"        self.assertDictEqual("},{"line_number":1272,"context_line":"            dict(sg_snap_source_group), dict(get_sg_snap_source))"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"    def test_share_group_snapshot_get_all_by_project(self):"},{"line_number":1275,"context_line":"        fake_project \u003d uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":9,"id":"11a23ec1_8afef48e","line":1272,"range":{"start_line":1271,"start_character":8,"end_line":1272,"end_character":65},"in_reply_to":"ea143e6a_7328e3d3","updated":"2021-07-08 14:34:07.000000000","message":"This will fail since we are removing the share_group attr to avoid sqlalchemy objects being compared. Unless I\u0027m missing your point :)","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"124122d11153eb1e6b7435c99d742fe4d2d3b1df","unresolved":true,"context_lines":[{"line_number":1300,"context_line":"        self.assertEqual(1, len(snaps))"},{"line_number":1301,"context_line":"        snap \u003d snaps[0]"},{"line_number":1302,"context_line":"        get_sg_snap_source \u003d dict(snap).pop(\u0027share_group\u0027, {})"},{"line_number":1303,"context_line":"        self.assertDictEqual("},{"line_number":1304,"context_line":"            dict(sg_snap_source_group), dict(get_sg_snap_source))"},{"line_number":1305,"context_line":"        self.assertEqual(fake_project, snap[\u0027project_id\u0027])"},{"line_number":1306,"context_line":""},{"line_number":1307,"context_line":"    def test_share_group_snapshot_update(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"8935dc78_ac43b775","line":1304,"range":{"start_line":1303,"start_character":8,"end_line":1304,"end_character":65},"updated":"2021-07-07 22:20:07.000000000","message":"same comment as above, please also add:\n\n   self.assertDictEqual(dict(expected_sg_snap), dict(snap))","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"124122d11153eb1e6b7435c99d742fe4d2d3b1df","unresolved":true,"context_lines":[{"line_number":1347,"context_line":"        get_sg_snap_source_member \u003d dict(member).pop("},{"line_number":1348,"context_line":"            \u0027share_group_snapshot\u0027, {})"},{"line_number":1349,"context_line":"        get_sg_snap_source_member \u003d dict(member).pop(\u0027share_instance\u0027, {})"},{"line_number":1350,"context_line":"        self.assertDictEqual(dict("},{"line_number":1351,"context_line":"            sg_snap_source_member), dict(get_sg_snap_source_member))"},{"line_number":1352,"context_line":""},{"line_number":1353,"context_line":"    def test_count_share_group_snapshot_members_in_share(self):"},{"line_number":1354,"context_line":"        sg \u003d db_utils.create_share_group()"}],"source_content_type":"text/x-python","patch_set":9,"id":"81dbcbc7_69e95f8d","line":1351,"range":{"start_line":1350,"start_character":8,"end_line":1351,"end_character":68},"updated":"2021-07-07 22:20:07.000000000","message":"same comment as above:\n\n    self.assertDictEqual(dict(expected_member), member))","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"124122d11153eb1e6b7435c99d742fe4d2d3b1df","unresolved":true,"context_lines":[{"line_number":1385,"context_line":"        get_sg_snap_source_member \u003d dict(member).pop(\u0027share_instance\u0027, {})"},{"line_number":1386,"context_line":""},{"line_number":1387,"context_line":"        self.assertDictEqual(dict("},{"line_number":1388,"context_line":"            sg_snap_source_member), dict(get_sg_snap_source_member))"},{"line_number":1389,"context_line":""},{"line_number":1390,"context_line":"    def test_share_group_snapshot_members_get_not_found(self):"},{"line_number":1391,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":9,"id":"b82c8a34_72a8ee64","line":1388,"range":{"start_line":1388,"start_character":67,"end_line":1388,"end_character":68},"updated":"2021-07-07 22:20:07.000000000","message":"+ \n\n  self.assertDictEqual(dict(expected_member), dict(member))","commit_id":"7a4d620b21887edc92f9245257ea47b4fe3e4fbd"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b65350a24f29bf7e082ecdceb7d1b84e8aa7fbd0","unresolved":true,"context_lines":[{"line_number":1243,"context_line":"        get_sg_snap \u003d db_api.share_group_snapshot_get(self.ctxt, sg_snap[\u0027id\u0027])"},{"line_number":1244,"context_line":"        get_sg_snap_source_group \u003d dict(get_sg_snap).pop(\u0027share_group\u0027, {})"},{"line_number":1245,"context_line":""},{"line_number":1246,"context_line":"        self.assertDictEqual(dict(sg_snap_source_group),"},{"line_number":1247,"context_line":"                             dict(get_sg_snap_source_group))"},{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"    def test_share_group_snapshot_get_all(self):"},{"line_number":1250,"context_line":"        sg \u003d db_utils.create_share_group()"}],"source_content_type":"text/x-python","patch_set":10,"id":"0a7ab8f5_e4ff5770","line":1247,"range":{"start_line":1246,"start_character":8,"end_line":1247,"end_character":60},"updated":"2021-07-13 21:38:29.000000000","message":"Archana, this test isn\u0027t fixed yet - can you please see comments on PS#9?","commit_id":"2cdd2e1a5f1af06b9886438f5e1f8ece3812d4b1"}],"manila/tests/scheduler/test_host_manager.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"0e66501739ce55714c35fc018f83b22e9ae44042","unresolved":true,"context_lines":[{"line_number":1139,"context_line":"        self.assertEqual(\u0027pool0\u0027, fake_pool.pool_name)"},{"line_number":1140,"context_line":"        self.assertEqual(1024, fake_pool.total_capacity_gb)"},{"line_number":1141,"context_line":"        self.assertEqual(512, fake_pool.free_capacity_gb)"},{"line_number":1142,"context_line":"        self.assertDictEqual(share_capability, fake_pool.capabilities)"},{"line_number":1143,"context_line":""},{"line_number":1144,"context_line":"        if \u0027thin_provisioning\u0027 in share_capability:"},{"line_number":1145,"context_line":"            thin_provisioned \u003d scheduler_utils.thin_provisioning("}],"source_content_type":"text/x-python","patch_set":4,"id":"2b4f104e_5b57cfe9","line":1142,"range":{"start_line":1142,"start_character":47,"end_line":1142,"end_character":69},"updated":"2021-06-23 01:39:06.000000000","message":"This happens to be an instance of a custom class called ReadOnlyDict:\n\nhttps://github.com/openstack/manila/blob/70bb650e7f09cd5a4731827270358e3285eb2df3/manila/scheduler/host_manager.py#L163\n\nIn the unit test result, you\u0027ll notice that this is being interpreted as a string: https://541801f70bf0c1edba87-2344f8d71749bd5aac75027308191d87.ssl.cf1.rackcdn.com/795990/4/check/openstack-tox-py36/6c99e33/testr_results.html#javascript:showTestDetail(\u0027div_ft2.1\u0027) \n\nSo try casting this into a dictionary:\n\n  dict(fake_pool.capabilities)","commit_id":"fd1bdb0039bbb9c0cb20e0b54001f9ac3604cece"}]}
