)]}'
{"horizon/test/unit/test_base.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"570900abb652ac92d0fb69f01d40f16fb7bde32b","unresolved":false,"context_lines":[{"line_number":349,"context_line":"        settings.SECURE_PROXY_SSL_HEADER \u003d None"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"class GetUserHomeTests(test.TestCase):"},{"line_number":353,"context_line":"    \"\"\"Test get_user_home parameters.\"\"\""},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_c63af9ca","line":352,"range":{"start_line":352,"start_character":23,"end_line":352,"end_character":36},"updated":"2020-09-28 01:37:48.000000000","message":"This change is special. Let me explain the reason.\n\nGetUserHomeTests class inherited BaseHorizonTests, but super() at L.357 calls setUp method of the parent of the parent class (i.e. test.TestCase) instead of the parent class (i.e. BaseHorizonTests).\nIn addition, this class does not depend on BaseHorizonTests.\n\nConsidering this, I changed the parent to test.TestCase.","commit_id":"b684295a1fbee1b37f88e2e847e7d782ea2b4b2e"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"570900abb652ac92d0fb69f01d40f16fb7bde32b","unresolved":false,"context_lines":[{"line_number":362,"context_line":"    def tearDown(self):"},{"line_number":363,"context_line":"        settings.HORIZON_CONFIG[\u0027user_home\u0027] \u003d self.orig_user_home"},{"line_number":364,"context_line":"        conf.HORIZON_CONFIG._setup()"},{"line_number":365,"context_line":"        super().tearDown()"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def test_using_callable(self):"},{"line_number":368,"context_line":"        def themable_user_fnc(user):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_a63545dd","line":365,"updated":"2020-09-28 01:37:48.000000000","message":"It is recommended to call super().tearDown even if there is nothing special.","commit_id":"b684295a1fbee1b37f88e2e847e7d782ea2b4b2e"}],"openstack_dashboard/test/integration_tests/pages/identity/projectspage.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"88ba3c1549ac7bd6910a2b76f0670db19220a73e","unresolved":false,"context_lines":[{"line_number":21,"context_line":"              {\u0027members\u0027: menus.MembershipMenuRegion})"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    def __init__(self, driver, conf, tab\u003d0):"},{"line_number":24,"context_line":"        super().__init__(driver, conf, field_mappings\u003dself.FIELDS, default_tab\u003dtab)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class ProjectsTable(tables.TableRegion):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_f56981f8","line":24,"updated":"2020-09-15 08:44:45.000000000","message":"pep8: E501 line too long (83 \u003e 80 characters)","commit_id":"97590025f4ae6355ed704771b23a3c5021b94bd5"}],"openstack_dashboard/test/integration_tests/regions/forms.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"4417a56a0d6f0bb240f94b38f67b2f546128a942","unresolved":false,"context_lines":[{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    def _prepare_mappings(self, field_mappings):"},{"line_number":449,"context_line":"        return ["},{"line_number":450,"context_line":"            super()._prepare_mappings(tab_mappings)"},{"line_number":451,"context_line":"            for tab_mappings in field_mappings"},{"line_number":452,"context_line":"        ]"},{"line_number":453,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_cd8e1f25","line":450,"updated":"2020-10-06 10:09:36.000000000","message":"Surprisingly, this super() does not work.\nReverting this line passes the integration tests [1].\n\nI am not sure what causes this failure, but one possible reason is that it calls super()._prepare_mappings multiple times in a subclass. It might not be assumed.\n\n[1] https://review.opendev.org/#/c/754899/3/openstack_dashboard/test/integration_tests/regions/forms.py","commit_id":"b684295a1fbee1b37f88e2e847e7d782ea2b4b2e"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fce922427cdbef8b4a6fb923eb95b2737280a6a","unresolved":false,"context_lines":[{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    def _prepare_mappings(self, field_mappings):"},{"line_number":449,"context_line":"        return ["},{"line_number":450,"context_line":"            super()._prepare_mappings(tab_mappings)"},{"line_number":451,"context_line":"            for tab_mappings in field_mappings"},{"line_number":452,"context_line":"        ]"},{"line_number":453,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_a42c0048","line":450,"in_reply_to":"9f560f44_cd8e1f25","updated":"2020-10-14 08:20:25.000000000","message":"I confirmed this style does not work even in the following simple case.\nAs a conclusion, I think it is better to prepare a submethod not to call super() multiple times.\n\n  class Foo():\n      def __init__(self):\n          self.val \u003d self._prepare()\n\n      def _prepare(self):\n          return \u0027x\u0027\n\n  class Bar(Foo):\n      def _prepare(self):\n          return [\n              super()._prepare()\n              for i in range(3)\n          ]","commit_id":"b684295a1fbee1b37f88e2e847e7d782ea2b4b2e"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"4417a56a0d6f0bb240f94b38f67b2f546128a942","unresolved":false,"context_lines":[{"line_number":492,"context_line":""},{"line_number":493,"context_line":"    def _prepare_mappings(self, field_mappings):"},{"line_number":494,"context_line":"        return ["},{"line_number":495,"context_line":"            super()._prepare_mappings(step_mappings)"},{"line_number":496,"context_line":"            for step_mappings in field_mappings"},{"line_number":497,"context_line":"        ]"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_6d9f1351","line":495,"updated":"2020-10-06 10:09:36.000000000","message":"Same as above","commit_id":"b684295a1fbee1b37f88e2e847e7d782ea2b4b2e"}]}
