)]}'
{"barbican/model/models.py":[{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"2446754176493c6f52c31b645e068cba4b2e127d","unresolved":false,"context_lines":[{"line_number":1317,"context_line":""},{"line_number":1318,"context_line":"        if project_id is None:"},{"line_number":1319,"context_line":"            raise exception.MissingArgumentError(msg.format(\"project_id\"))"},{"line_number":1320,"context_line":"        self.project_id \u003d project_id"},{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":"        if parsed_project_quotas is None:"},{"line_number":1323,"context_line":"            self.secrets \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_10c6f569","side":"PARENT","line":1320,"updated":"2018-07-01 13:25:31.000000000","message":"I\u0027m trying to understand why this change is needed.  Why do we need to remove this check?","commit_id":"52dd514e3c15eee9623c93d9d6e46155382096ef"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"428f7fa7575b9932ba267cf46dcf73f37ca1d607","unresolved":false,"context_lines":[{"line_number":1317,"context_line":""},{"line_number":1318,"context_line":"        if project_id is None:"},{"line_number":1319,"context_line":"            raise exception.MissingArgumentError(msg.format(\"project_id\"))"},{"line_number":1320,"context_line":"        self.project_id \u003d project_id"},{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":"        if parsed_project_quotas is None:"},{"line_number":1323,"context_line":"            self.secrets \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_d08b9d14","side":"PARENT","line":1320,"in_reply_to":"5f7c97a3_10c6f569","updated":"2018-07-01 13:31:13.000000000","message":"Ok, I understand now why this test is being removed -- because when OVO switch is done, then this object will never be accessed directly.\n\nI think a better idea is to add a comment that this check and the corresponding check should be removed once the OVO switch is made.  Otherwise, we run the risk of adding regressions while OVO is not yet active.","commit_id":"52dd514e3c15eee9623c93d9d6e46155382096ef"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"73b099b1ae7378e42c406e7e7f1455b0cafcef4d","unresolved":false,"context_lines":[{"line_number":1317,"context_line":""},{"line_number":1318,"context_line":"        if project_id is None:"},{"line_number":1319,"context_line":"            raise exception.MissingArgumentError(msg.format(\"project_id\"))"},{"line_number":1320,"context_line":"        self.project_id \u003d project_id"},{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":"        if parsed_project_quotas is None:"},{"line_number":1323,"context_line":"            self.secrets \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_22bd6c67","side":"PARENT","line":1320,"in_reply_to":"5f7c97a3_7bf60093","updated":"2018-07-07 09:13:38.000000000","message":"Done","commit_id":"52dd514e3c15eee9623c93d9d6e46155382096ef"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"7192be1e6d9351ce22880287aa2e47f220223fdd","unresolved":false,"context_lines":[{"line_number":1317,"context_line":""},{"line_number":1318,"context_line":"        if project_id is None:"},{"line_number":1319,"context_line":"            raise exception.MissingArgumentError(msg.format(\"project_id\"))"},{"line_number":1320,"context_line":"        self.project_id \u003d project_id"},{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":"        if parsed_project_quotas is None:"},{"line_number":1323,"context_line":"            self.secrets \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_7bf60093","side":"PARENT","line":1320,"in_reply_to":"5f7c97a3_be46e24f","updated":"2018-07-03 14:38:34.000000000","message":"works for me -- check_exception defaults to True","commit_id":"52dd514e3c15eee9623c93d9d6e46155382096ef"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"1b556797f862951cb63fcb3c1bf3da4c07b6b9e7","unresolved":false,"context_lines":[{"line_number":1317,"context_line":""},{"line_number":1318,"context_line":"        if project_id is None:"},{"line_number":1319,"context_line":"            raise exception.MissingArgumentError(msg.format(\"project_id\"))"},{"line_number":1320,"context_line":"        self.project_id \u003d project_id"},{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":"        if parsed_project_quotas is None:"},{"line_number":1323,"context_line":"            self.secrets \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_be46e24f","side":"PARENT","line":1320,"in_reply_to":"5f7c97a3_d08b9d14","updated":"2018-07-02 15:56:22.000000000","message":"Yes, you are right. Normally, when creating a model for the database. OVO just creates an instance of model with no input (exclude some special cases) then the instance will be updated by this line of code [1]. And the last path of your comment is right, let me think a solution to fix this point. \n\n\u003d\u003d\u003d\u003d\u003d\u003d\n\nA solution I have for now that. I will add a parameter with the __init__ method (named check_exception for example) and the default value of this. Then we can use this parameter as below:\n\n\"\"\"\nif project_id is None and check_exception:\n    raise exception.MissingArgumentError(msg.format(\"project_id\"))\n\u0027\u0027\u0027\u0027\n\nWhat do you think?\n\n[1] https://github.com/openstack/barbican/blob/master/barbican/objects/base.py#L147","commit_id":"52dd514e3c15eee9623c93d9d6e46155382096ef"}],"barbican/tests/model/test_models.py":[{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"2446754176493c6f52c31b645e068cba4b2e127d","unresolved":false,"context_lines":[{"line_number":582,"context_line":"    # def test_should_throw_exception_missing_project_id(self):"},{"line_number":583,"context_line":"    #     self.assertRaises(exception.MissingArgumentError,"},{"line_number":584,"context_line":"    #                       models.ProjectQuotas, None, None)"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"    def test_project_quotas_check_to_dict_fields(self):"},{"line_number":587,"context_line":"        project \u003d models.Project()"},{"line_number":588,"context_line":"        project.id \u003d \u002712345\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_30c1b14f","line":585,"updated":"2018-07-01 13:25:31.000000000","message":"Same comment as in previous file.  Why does this check and test need to be removed?  The lower level non-versioned objects should not be affected by OVO changes, right?","commit_id":"e650e60d9c9e3c9aa48ec4dee919a941ae3eb26e"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"1b556797f862951cb63fcb3c1bf3da4c07b6b9e7","unresolved":false,"context_lines":[{"line_number":582,"context_line":"    # def test_should_throw_exception_missing_project_id(self):"},{"line_number":583,"context_line":"    #     self.assertRaises(exception.MissingArgumentError,"},{"line_number":584,"context_line":"    #                       models.ProjectQuotas, None, None)"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"    def test_project_quotas_check_to_dict_fields(self):"},{"line_number":587,"context_line":"        project \u003d models.Project()"},{"line_number":588,"context_line":"        project.id \u003d \u002712345\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_de64feb5","line":585,"in_reply_to":"5f7c97a3_30c1b14f","updated":"2018-07-02 15:56:22.000000000","message":"As my understanding, this unit-test is to raise an exception for ProjectQuotas in the models.py file, in case you pass project_id\u003dNone. However, in this patch, the exception is deleted so no need to test this.","commit_id":"e650e60d9c9e3c9aa48ec4dee919a941ae3eb26e"}],"barbican/tests/objects/test_ovo_project.py":[{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"2446754176493c6f52c31b645e068cba4b2e127d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        self.assertFalse(create_project_ovo.deleted)"},{"line_number":31,"context_line":"        self.assertEqual(\u0027ACTIVE\u0027, create_project_ovo.status)"},{"line_number":32,"context_line":"        self.assertIsNone(create_project_ovo.deleted_at)"},{"line_number":33,"context_line":"        self.assertIsNotNone(create_project_ovo.id)"},{"line_number":34,"context_line":"        # Update project"},{"line_number":35,"context_line":"        update_project_ovo \u003d objects.Project(id\u003dproject_id,"},{"line_number":36,"context_line":"                                             status\u003d\u0027ERROR\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_90a765bd","line":33,"updated":"2018-07-01 13:25:31.000000000","message":"For sanity here, lets do a get test before updating.","commit_id":"e650e60d9c9e3c9aa48ec4dee919a941ae3eb26e"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"1b556797f862951cb63fcb3c1bf3da4c07b6b9e7","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        self.assertFalse(create_project_ovo.deleted)"},{"line_number":31,"context_line":"        self.assertEqual(\u0027ACTIVE\u0027, create_project_ovo.status)"},{"line_number":32,"context_line":"        self.assertIsNone(create_project_ovo.deleted_at)"},{"line_number":33,"context_line":"        self.assertIsNotNone(create_project_ovo.id)"},{"line_number":34,"context_line":"        # Update project"},{"line_number":35,"context_line":"        update_project_ovo \u003d objects.Project(id\u003dproject_id,"},{"line_number":36,"context_line":"                                             status\u003d\u0027ERROR\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_2880589c","line":33,"in_reply_to":"5f7c97a3_90a765bd","updated":"2018-07-02 15:56:22.000000000","message":":) you are right, I will update unit-tests which have a same issue","commit_id":"e650e60d9c9e3c9aa48ec4dee919a941ae3eb26e"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"2446754176493c6f52c31b645e068cba4b2e127d","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                                            session\u003dself.session)"},{"line_number":45,"context_line":"        self.assertRaises(exception.NotFound, objects.Project.get,"},{"line_number":46,"context_line":"                          entity_id\u003dproject_id)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def test_ovo_should_raise_no_result_found(self):"},{"line_number":49,"context_line":"        self.assertRaises(exception.NotFound, objects.Project.get,"},{"line_number":50,"context_line":"                          entity_id\u003d\"key project id\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_f0a019a7","line":47,"updated":"2018-07-01 13:25:31.000000000","message":"can you add a test to indicate what happens if you try to update the deleted project?","commit_id":"e650e60d9c9e3c9aa48ec4dee919a941ae3eb26e"}],"barbican/tests/objects/test_ovo_project_quotas.py":[{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"2446754176493c6f52c31b645e068cba4b2e127d","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        self.assertIsNone(retrieved_project_quotas)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def test_ovo_get_by_create_date_nothing(self):"},{"line_number":207,"context_line":"        retrieved_project_quotas, offset, limit, total \u003d \\"},{"line_number":208,"context_line":"            objects.ProjectQuotas.get_by_create_date("},{"line_number":209,"context_line":"                session\u003dself.session, suppress_exception\u003dTrue)"},{"line_number":210,"context_line":"        self.assertEqual([], retrieved_project_quotas)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_507a2d25","line":207,"updated":"2018-07-01 13:25:31.000000000","message":"Is this a duplicate of the test on line 124?","commit_id":"e650e60d9c9e3c9aa48ec4dee919a941ae3eb26e"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"2446754176493c6f52c31b645e068cba4b2e127d","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            session\u003dself.session)"},{"line_number":220,"context_line":"        self.session.commit()"},{"line_number":221,"context_line":"        objects.ProjectQuotas.delete_by_external_project_id("},{"line_number":222,"context_line":"            self.external_id1, session\u003dself.session)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def test_ovo_should_raise_delete_not_found(self):"},{"line_number":225,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_7075e932","line":222,"updated":"2018-07-01 13:25:31.000000000","message":"do we need to test that the quota exists - and then doesn\u0027t exist?","commit_id":"e650e60d9c9e3c9aa48ec4dee919a941ae3eb26e"}]}
