)]}'
{"nova/tests/unit/policies/base.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8da9e0bbe1418e78af3efac37b68411031e1459d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        for context in authorized_contexts:"},{"line_number":106,"context_line":"            LOG.info(\"Testing authorized context: %s\", context)"},{"line_number":107,"context_line":"            req.environ[\u0027nova.context\u0027] \u003d context"},{"line_number":108,"context_line":"            args1 \u003d copy.deepcopy(arg)"},{"line_number":109,"context_line":"            kwargs1 \u003d copy.deepcopy(kwarg)"},{"line_number":110,"context_line":"            func(req, *args1, **kwargs1)"},{"line_number":111,"context_line":"        # Verify all the context not having allowed scope or roles fail"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_3d1e5670","line":108,"updated":"2020-03-02 10:27:41.000000000","message":"oh, my. fair enough.","commit_id":"b2647f17248064294d60f27a69ee63c3171a48b0"}],"nova/tests/unit/policies/test_agents.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"4e806b81b8efabef6ad24854923c3e1359a58cf0","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            self.project_foo_context, self.project_reader_context"},{"line_number":45,"context_line":"        ]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @mock.patch(\u0027nova.db.api.agent_build_destroy\u0027)"},{"line_number":48,"context_line":"    def test_delete_agent_policy(self, mock_delete):"},{"line_number":49,"context_line":"        rule_name \u003d \"os_compute_api:os-agents\""},{"line_number":50,"context_line":"        self.common_policy_check(self.admin_authorized_contexts,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_e3ffacae","line":47,"updated":"2020-02-07 17:24:29.000000000","message":"Why are these mocks necessary here but not in the original tests that these are based on? The key difference I see is the base class. I thought \u0027NoDBTestCase\u0027 made sure you weren\u0027t using the DB, rather than mock things","commit_id":"b83fd4829220a557b5563bb2d49c7a12de321067"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"603e1ee386d7e96ebbf41c8f3f8e6771ed1747b5","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            self.project_foo_context, self.project_reader_context"},{"line_number":45,"context_line":"        ]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @mock.patch(\u0027nova.db.api.agent_build_destroy\u0027)"},{"line_number":48,"context_line":"    def test_delete_agent_policy(self, mock_delete):"},{"line_number":49,"context_line":"        rule_name \u003d \"os_compute_api:os-agents\""},{"line_number":50,"context_line":"        self.common_policy_check(self.admin_authorized_contexts,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_4a6ecc65","line":47,"in_reply_to":"3fa7e38b_e3ffacae","updated":"2020-02-08 16:11:09.000000000","message":"old tests are not testing the success cases and fail early. These new tests with new framework check for complete success and some cases (not this test) need mocked value to prepare the API response.","commit_id":"b83fd4829220a557b5563bb2d49c7a12de321067"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9f471aee61f4549363a890c8fe61ebb5a01104d8","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class AgentsPolicyTest(base.BasePolicyTest):"},{"line_number":22,"context_line":"    \"\"\"Test os-agentss APIs policies with all possible context."},{"line_number":23,"context_line":"    This class defines the set of context with different roles"},{"line_number":24,"context_line":"    which are allowed and not allowed to pass the policy checks."},{"line_number":25,"context_line":"    With those set of context, it will call the API operation and"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_49e7eee5","line":22,"range":{"start_line":22,"start_character":12,"end_line":22,"end_character":22},"updated":"2020-02-28 12:51:56.000000000","message":"s/os-agentss/os-agents","commit_id":"b2647f17248064294d60f27a69ee63c3171a48b0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8da9e0bbe1418e78af3efac37b68411031e1459d","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class AgentsPolicyTest(base.BasePolicyTest):"},{"line_number":22,"context_line":"    \"\"\"Test os-agentss APIs policies with all possible context."},{"line_number":23,"context_line":"    This class defines the set of context with different roles"},{"line_number":24,"context_line":"    which are allowed and not allowed to pass the policy checks."},{"line_number":25,"context_line":"    With those set of context, it will call the API operation and"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_bd09e631","line":22,"range":{"start_line":22,"start_character":12,"end_line":22,"end_character":22},"in_reply_to":"1fa4df85_49e7eee5","updated":"2020-03-02 10:27:41.000000000","message":"yeah, don\u0027t want to block on that though.","commit_id":"b2647f17248064294d60f27a69ee63c3171a48b0"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9f471aee61f4549363a890c8fe61ebb5a01104d8","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"class AgentsScopeTypePolicyTest(AgentsPolicyTest):"},{"line_number":100,"context_line":"    \"\"\"Test os-sgents APIs policies with system scope enabled."},{"line_number":101,"context_line":"    This class set the nova.conf [oslo_policy] enforce_scope to True"},{"line_number":102,"context_line":"    so that we can switch on the scope checking on oslo policy side."},{"line_number":103,"context_line":"    It defines the set of context with scoped token"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_29c71248","line":100,"range":{"start_line":100,"start_character":15,"end_line":100,"end_character":21},"updated":"2020-02-28 12:51:56.000000000","message":"s/os-sgents/os-agents","commit_id":"b2647f17248064294d60f27a69ee63c3171a48b0"}]}
