)]}'
{"horizon/base.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"06afba5462eb174423c2c4a4c252e270df53c506","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        A list of panel module names which should be contained within this"},{"line_number":351,"context_line":"        grouping."},{"line_number":352,"context_line":"    \"\"\""},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def __init__(self, dashboard, slug\u003dNone, name\u003dNone, panels\u003dNone):"},{"line_number":355,"context_line":"        self.dashboard \u003d dashboard"},{"line_number":356,"context_line":"        self.slug \u003d slug or getattr(self, \"slug\", DEFAULT_PANEL_GROUP)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_14999a77","line":353,"updated":"2018-01-17 10:11:51.000000000","message":"Looks unrelated change","commit_id":"c92f4b9d28324821b2c152bf6b415524bab4ed80"},{"author":{"_account_id":27578,"name":"David Gutman","email":"david.gutman@thalesgroup.com","username":"david.gutman"},"change_message_id":"dc4e664306ffcfcf4f7c4e4cfd0ca2f0c4d92102","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        A list of panel module names which should be contained within this"},{"line_number":351,"context_line":"        grouping."},{"line_number":352,"context_line":"    \"\"\""},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def __init__(self, dashboard, slug\u003dNone, name\u003dNone, panels\u003dNone):"},{"line_number":355,"context_line":"        self.dashboard \u003d dashboard"},{"line_number":356,"context_line":"        self.slug \u003d slug or getattr(self, \"slug\", DEFAULT_PANEL_GROUP)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_8c159342","line":353,"in_reply_to":"7f96bb07_14999a77","updated":"2018-01-17 17:00:01.000000000","message":"Done","commit_id":"c92f4b9d28324821b2c152bf6b415524bab4ed80"}],"horizon/decorators.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"06afba5462eb174423c2c4a4c252e270df53c506","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    By example the check of component policy rules will be applied to its"},{"line_number":103,"context_line":"    views."},{"line_number":104,"context_line":"    \"\"\""},{"line_number":105,"context_line":"    from horizon.exceptions import NotAuthorized"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @functools.wraps(view_func, assigned\u003davailable_attrs(view_func))"},{"line_number":108,"context_line":"    def dec(request, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_b4078682","line":105,"range":{"start_line":105,"start_character":3,"end_line":105,"end_character":48},"updated":"2018-01-17 10:11:51.000000000","message":"Could you move this import to the beginning of the file?","commit_id":"c92f4b9d28324821b2c152bf6b415524bab4ed80"},{"author":{"_account_id":27578,"name":"David Gutman","email":"david.gutman@thalesgroup.com","username":"david.gutman"},"change_message_id":"7b886f0f5a634d518fb8d698332d432cef6e0dba","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    By example the check of component policy rules will be applied to its"},{"line_number":103,"context_line":"    views."},{"line_number":104,"context_line":"    \"\"\""},{"line_number":105,"context_line":"    from horizon.exceptions import NotAuthorized"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @functools.wraps(view_func, assigned\u003davailable_attrs(view_func))"},{"line_number":108,"context_line":"    def dec(request, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_3ed32506","line":105,"range":{"start_line":105,"start_character":3,"end_line":105,"end_character":48},"in_reply_to":"7f96bb07_8c4d933f","updated":"2018-01-18 13:40:51.000000000","message":"Finally the import can\u0027t be move to the beginning of the file because this file is loaded to soon, and the import will trigger a \"django.core.exceptions.AppRegistryNotReady: Apps aren\u0027t loaded yet.\"","commit_id":"c92f4b9d28324821b2c152bf6b415524bab4ed80"},{"author":{"_account_id":27578,"name":"David Gutman","email":"david.gutman@thalesgroup.com","username":"david.gutman"},"change_message_id":"dc4e664306ffcfcf4f7c4e4cfd0ca2f0c4d92102","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    By example the check of component policy rules will be applied to its"},{"line_number":103,"context_line":"    views."},{"line_number":104,"context_line":"    \"\"\""},{"line_number":105,"context_line":"    from horizon.exceptions import NotAuthorized"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @functools.wraps(view_func, assigned\u003davailable_attrs(view_func))"},{"line_number":108,"context_line":"    def dec(request, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_8c4d933f","line":105,"range":{"start_line":105,"start_character":3,"end_line":105,"end_character":48},"in_reply_to":"7f96bb07_b4078682","updated":"2018-01-17 17:00:01.000000000","message":"Done","commit_id":"c92f4b9d28324821b2c152bf6b415524bab4ed80"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"06afba5462eb174423c2c4a4c252e270df53c506","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @functools.wraps(view_func, assigned\u003davailable_attrs(view_func))"},{"line_number":108,"context_line":"    def dec(request, *args, **kwargs):"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if not component.can_access({\u0027request\u0027: request}):"},{"line_number":111,"context_line":"            raise NotAuthorized(_(\"You are not authorized to access %s\")"},{"line_number":112,"context_line":"                                % request.path)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_b42c6602","line":109,"updated":"2018-01-17 10:11:51.000000000","message":"Looking at the other decorators in this module, this blank line looks unnecessary for consistency.","commit_id":"c92f4b9d28324821b2c152bf6b415524bab4ed80"},{"author":{"_account_id":27578,"name":"David Gutman","email":"david.gutman@thalesgroup.com","username":"david.gutman"},"change_message_id":"dc4e664306ffcfcf4f7c4e4cfd0ca2f0c4d92102","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @functools.wraps(view_func, assigned\u003davailable_attrs(view_func))"},{"line_number":108,"context_line":"    def dec(request, *args, **kwargs):"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if not component.can_access({\u0027request\u0027: request}):"},{"line_number":111,"context_line":"            raise NotAuthorized(_(\"You are not authorized to access %s\")"},{"line_number":112,"context_line":"                                % request.path)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_4c346bde","line":109,"in_reply_to":"7f96bb07_b42c6602","updated":"2018-01-17 17:00:01.000000000","message":"Done","commit_id":"c92f4b9d28324821b2c152bf6b415524bab4ed80"}],"openstack_dashboard/dashboards/identity/domains/tests.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"06afba5462eb174423c2c4a4c252e270df53c506","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def setUp(self):"},{"line_number":41,"context_line":"        super(DomainsViewTests, self).setUp()"},{"line_number":42,"context_line":"        self.setSessionValues(domain_token\u003d\"fake_domain_token\")"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @test.create_stubs({api.keystone: (\u0027domain_get\u0027,"},{"line_number":45,"context_line":"                                       \u0027domain_list\u0027,)})"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_344056a5","line":42,"updated":"2018-01-17 10:11:51.000000000","message":"Could you explain why this change is related to the horizon base.py change?","commit_id":"c92f4b9d28324821b2c152bf6b415524bab4ed80"},{"author":{"_account_id":27578,"name":"David Gutman","email":"david.gutman@thalesgroup.com","username":"david.gutman"},"change_message_id":"dc4e664306ffcfcf4f7c4e4cfd0ca2f0c4d92102","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def setUp(self):"},{"line_number":41,"context_line":"        super(DomainsViewTests, self).setUp()"},{"line_number":42,"context_line":"        self.setSessionValues(domain_token\u003d\"fake_domain_token\")"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @test.create_stubs({api.keystone: (\u0027domain_get\u0027,"},{"line_number":45,"context_line":"                                       \u0027domain_list\u0027,)})"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_4cef8be8","line":42,"in_reply_to":"7f96bb07_344056a5","updated":"2018-01-17 17:00:01.000000000","message":"The decorator which is added on each view (dynamically) will check the can_access method of the parent panel to allow or not the access to the view.\nThe Domains panel (openstack_dashboard.dashboards.identity.domains.panel.Domains) redefines its can_access method, and forbid the access if the request session domain_token is not defined. \n\nSo I had to define a fake domain_token in tests to allow the access to the tested views.\n\nDo you want me to add this in a comment ?","commit_id":"c92f4b9d28324821b2c152bf6b415524bab4ed80"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"07beb5a66f9e5f843e911f4eca63bd3807fbf4ed","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def setUp(self):"},{"line_number":41,"context_line":"        super(DomainsViewTests, self).setUp()"},{"line_number":42,"context_line":"        self.setSessionValues(domain_token\u003d\"fake_domain_token\")"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @test.create_stubs({api.keystone: (\u0027domain_get\u0027,"},{"line_number":45,"context_line":"                                       \u0027domain_list\u0027,)})"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f93b717_4b12e863","line":42,"in_reply_to":"7f96bb07_4cef8be8","updated":"2018-02-02 10:51:56.000000000","message":"Sorry for late. What we need to do is to ensure can_access() returns True to run the unit tests here. I would suggest to add an entry to openstack_dashboard.test.settings [1].\n\n[1] https://github.com/openstack/horizon/blob/master/openstack_dashboard/test/settings.py#L294","commit_id":"c92f4b9d28324821b2c152bf6b415524bab4ed80"}]}
