)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a25bfd6c3dfaa9f06ef979fc78f908ff962d8bea","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Create unit tests for endpoint policy drivers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change adds unit tests for the current version of the endpoint"},{"line_number":10,"context_line":"policy abstract driver."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It also clarifies the return type of get_policy_association in the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":32,"id":"9a629dbe_79b03f44","line":9,"range":{"start_line":9,"start_character":36,"end_line":9,"end_character":51},"updated":"2016-11-08 14:53:21.000000000","message":"what other version would be tested?","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"}],"keystone/endpoint_policy/backends/base.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"58424dfb9c725aa7efe8119ab29e5d942131667a","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        :type region_id: string"},{"line_number":99,"context_line":"        :raises keystone.exception.PolicyAssociationNotFound: If there is no"},{"line_number":100,"context_line":"            match for the specified association."},{"line_number":101,"context_line":"        :returns: dict containing policy_id (value is a tuple)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        \"\"\""},{"line_number":104,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"}],"source_content_type":"text/x-python","patch_set":26,"id":"dab17558_b89d2abe","line":101,"updated":"2016-05-10 12:58:44.000000000","message":"tuple of what?","commit_id":"74df67e67c6cdea15f40ed297b76982a8ad6c8e1"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"50c9545ca0e739d6b5cac24ef1cb5bff8e4107ac","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        :type region_id: string"},{"line_number":99,"context_line":"        :raises keystone.exception.PolicyAssociationNotFound: If there is no"},{"line_number":100,"context_line":"            match for the specified association."},{"line_number":101,"context_line":"        :returns: dict containing policy_id (value is a tuple)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        \"\"\""},{"line_number":104,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"}],"source_content_type":"text/x-python","patch_set":26,"id":"dab17558_9772ff7a","line":101,"in_reply_to":"dab17558_b89d2abe","updated":"2016-05-13 12:47:43.000000000","message":"A tuple containing only the policy_id. The result is: {\u0027policy_id\u0027: (policy_id,)}\n\nI elaborated the doc a bit more","commit_id":"74df67e67c6cdea15f40ed297b76982a8ad6c8e1"}],"keystone/tests/unit/backend/endpoint_policy/test_sql.py":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"e3eb21d8b89f9298b6e23f0f473896ff20bc8d94","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                            \u0027service_id\u0027: uuid.uuid4().hex,"},{"line_number":45,"context_line":"                            \u0027region_id\u0027: uuid.uuid4().hex}"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        self.driver.create_policy_association(**self.association)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def test_recreate_policy_association(self):"},{"line_number":50,"context_line":"        override_association \u003d self.association.copy()"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_c0bd7469","line":47,"updated":"2015-08-28 08:11:45.000000000","message":"same here, use addCleanup to clean the sample data.","commit_id":"302bd0522a7a8ce56135b35afe8b8aea69d23d08"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"6550a4f47196e2acef182a75a4c758638367d171","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                            \u0027service_id\u0027: uuid.uuid4().hex,"},{"line_number":45,"context_line":"                            \u0027region_id\u0027: uuid.uuid4().hex}"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        self.driver.create_policy_association(**self.association)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def test_recreate_policy_association(self):"},{"line_number":50,"context_line":"        override_association \u003d self.association.copy()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_940fd02d","line":47,"in_reply_to":"9a1a9d01_01573703","updated":"2015-09-27 06:23:33.000000000","message":"yes, the table will be deleted after the testcase, so this is not necessary, thanks!","commit_id":"302bd0522a7a8ce56135b35afe8b8aea69d23d08"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0342f33aa486c0f369ec2484bdbff89b61e00047","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                            \u0027service_id\u0027: uuid.uuid4().hex,"},{"line_number":45,"context_line":"                            \u0027region_id\u0027: uuid.uuid4().hex}"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        self.driver.create_policy_association(**self.association)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def test_recreate_policy_association(self):"},{"line_number":50,"context_line":"        override_association \u003d self.association.copy()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_01573703","line":47,"in_reply_to":"da20952f_c0bd7469","updated":"2015-09-25 02:31:41.000000000","message":"Why bother? This is using the database fixture right?","commit_id":"302bd0522a7a8ce56135b35afe8b8aea69d23d08"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"e3eb21d8b89f9298b6e23f0f473896ff20bc8d94","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    def test_check_policy_association(self):"},{"line_number":61,"context_line":"        self.driver.check_policy_association(**self.association)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        wrong_targets \u003d [{\u0027service_id\u0027: self.association[\u0027service_id\u0027]},"},{"line_number":64,"context_line":"                         {\u0027region_id\u0027: self.association[\u0027region_id\u0027]}]"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        for wrong_target in wrong_targets:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_b1ce94b2","line":63,"updated":"2015-08-28 08:11:45.000000000","message":"this seems like the incomplete targets, could also given the full attributes but update with the a random value to assert the raise.","commit_id":"302bd0522a7a8ce56135b35afe8b8aea69d23d08"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"e3eb21d8b89f9298b6e23f0f473896ff20bc8d94","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        self.driver.delete_policy_association(**self.association)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        self.assertRaises(exception.PolicyAssociationNotFound,"},{"line_number":78,"context_line":"                          self.driver.check_policy_association,"},{"line_number":79,"context_line":"                          **self.association)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    @utils.wip(\"Blocked by bug #1483375, the assertEqual statement is going to\""}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_319cc468","line":78,"updated":"2015-08-28 08:11:45.000000000","message":"self.driver.get_policy_association maybe better in this context.","commit_id":"302bd0522a7a8ce56135b35afe8b8aea69d23d08"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"762dcc873edc3d39129abc103e899f9f446a8387","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.driver.delete_association_by_endpoint(association[\u0027endpoint_id\u0027])"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        self.driver.check_policy_association(**self.association)"},{"line_number":113,"context_line":"        self.assertRaises(exception.PolicyAssociationNotFound,"},{"line_number":114,"context_line":"                          self.driver.check_policy_association,"},{"line_number":115,"context_line":"                          **association)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_4af5c054","line":112,"updated":"2015-11-11 18:58:17.000000000","message":"We haven\u0027t done anything to `self.association` have we? Just wondering why we need to perform a check on it when the test is focusing on `association`.","commit_id":"bb3d275cfc1e840873ee7172be383948af784522"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"24ca24c3b1c7e37d0397e9a019acafca0ea71b1e","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.driver.delete_association_by_endpoint(association[\u0027endpoint_id\u0027])"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        self.driver.check_policy_association(**self.association)"},{"line_number":113,"context_line":"        self.assertRaises(exception.PolicyAssociationNotFound,"},{"line_number":114,"context_line":"                          self.driver.check_policy_association,"},{"line_number":115,"context_line":"                          **association)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a8ffd7b_9c983f6c","line":112,"in_reply_to":"9a8ffd7b_e47820fb","updated":"2015-12-07 13:39:47.000000000","message":"Done","commit_id":"bb3d275cfc1e840873ee7172be383948af784522"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"4d11c7d353e93f7cdc8bd5bb72449d3168c2ae94","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.driver.delete_association_by_endpoint(association[\u0027endpoint_id\u0027])"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        self.driver.check_policy_association(**self.association)"},{"line_number":113,"context_line":"        self.assertRaises(exception.PolicyAssociationNotFound,"},{"line_number":114,"context_line":"                          self.driver.check_policy_association,"},{"line_number":115,"context_line":"                          **association)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a8ffd7b_e47820fb","line":112,"in_reply_to":"da85f559_4af5c054","updated":"2015-11-24 13:00:53.000000000","message":"+1","commit_id":"bb3d275cfc1e840873ee7172be383948af784522"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"762dcc873edc3d39129abc103e899f9f446a8387","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self.driver.delete_association_by_service(service_id)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        self.driver.check_policy_association(**self.association)"},{"line_number":131,"context_line":"        for association in associations:"},{"line_number":132,"context_line":"            self.assertRaises(exception.PolicyAssociationNotFound,"},{"line_number":133,"context_line":"                              self.driver.check_policy_association,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_0aeb3879","line":130,"updated":"2015-11-11 18:58:17.000000000","message":"Same comment applies here and to lines 151 and 169.","commit_id":"bb3d275cfc1e840873ee7172be383948af784522"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"24ca24c3b1c7e37d0397e9a019acafca0ea71b1e","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self.driver.delete_association_by_service(service_id)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        self.driver.check_policy_association(**self.association)"},{"line_number":131,"context_line":"        for association in associations:"},{"line_number":132,"context_line":"            self.assertRaises(exception.PolicyAssociationNotFound,"},{"line_number":133,"context_line":"                              self.driver.check_policy_association,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a8ffd7b_dcdc871a","line":130,"in_reply_to":"da85f559_0aeb3879","updated":"2015-12-07 13:39:47.000000000","message":"Done","commit_id":"bb3d275cfc1e840873ee7172be383948af784522"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"94fd3926c0f9541b974448cdd5993ff85bd2c5c6","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def test_delete_association_by_region(self):"},{"line_number":135,"context_line":"        region_id \u003d uuid.uuid4().hex"},{"line_number":136,"context_line":"        policy_id \u003d uuid.uuid4().hex"},{"line_number":137,"context_line":"        associations \u003d [{\u0027policy_id\u0027: policy_id,"},{"line_number":138,"context_line":"                         \u0027service_id\u0027: uuid.uuid4().hex,"},{"line_number":139,"context_line":"                         \u0027region_id\u0027: region_id},"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_fd0b5328","line":136,"range":{"start_line":136,"start_character":8,"end_line":136,"end_character":17},"updated":"2016-01-04 22:24:05.000000000","message":"Do we need to save the policy_id? We don\u0027t reference it anywhere else in the test. Can it be referenced in the `associations` definition, like `service_id`?","commit_id":"f42f674396afe053af62cb70ffc01fbf0d51b7f7"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"f3ce965b4e0ef757989735e9bc4943b013c0a3a8","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def test_delete_association_by_region(self):"},{"line_number":135,"context_line":"        region_id \u003d uuid.uuid4().hex"},{"line_number":136,"context_line":"        policy_id \u003d uuid.uuid4().hex"},{"line_number":137,"context_line":"        associations \u003d [{\u0027policy_id\u0027: policy_id,"},{"line_number":138,"context_line":"                         \u0027service_id\u0027: uuid.uuid4().hex,"},{"line_number":139,"context_line":"                         \u0027region_id\u0027: region_id},"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_ff7eae68","line":136,"range":{"start_line":136,"start_character":8,"end_line":136,"end_character":17},"in_reply_to":"fa69d971_fd0b5328","updated":"2016-01-06 01:20:26.000000000","message":"Done","commit_id":"f42f674396afe053af62cb70ffc01fbf0d51b7f7"}],"keystone/tests/unit/endpoint_policy/backends/test_base.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c5b933a19f18305a49ac4299478d1adf6abb5aa8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_1db3250b","line":1,"updated":"2016-04-07 21:39:01.000000000","message":"There is no endpoint_policy/backends/base.py. This file should be in tests/unit/endpoint_policy/test_core.py","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"76e1a8fdbd8c9cb9f5d5b3abcf574be3060a3bb4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_9c4a6a26","line":1,"in_reply_to":"9a061dce_1db3250b","updated":"2016-04-08 15:31:58.000000000","message":"It soon will have, as we change it (as in all subsystems) to be in accordance with the already refactore identity backend","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c5b933a19f18305a49ac4299478d1adf6abb5aa8","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"        self.driver.create_policy_association(**self.association)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @abc.abstractmethod"},{"line_number":35,"context_line":"    def _get_driver(self):"},{"line_number":36,"context_line":"        raise exception.NotImplemented()"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_7de18129","line":34,"updated":"2016-04-07 21:39:01.000000000","message":"using an abstract base class is excessive in almost all cases.","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"76e1a8fdbd8c9cb9f5d5b3abcf574be3060a3bb4","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"        self.driver.create_policy_association(**self.association)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @abc.abstractmethod"},{"line_number":35,"context_line":"    def _get_driver(self):"},{"line_number":36,"context_line":"        raise exception.NotImplemented()"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_1dd5c1b8","line":34,"in_reply_to":"9a061dce_7de18129","updated":"2016-04-08 15:31:58.000000000","message":"Changed to an abstract property","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c5b933a19f18305a49ac4299478d1adf6abb5aa8","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @abc.abstractmethod"},{"line_number":35,"context_line":"    def _get_driver(self):"},{"line_number":36,"context_line":"        raise exception.NotImplemented()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_recreate_policy_association(self):"},{"line_number":39,"context_line":"        override_association \u003d self.association.copy()"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_ddeb6d11","line":36,"updated":"2016-04-07 21:39:01.000000000","message":"making this a property or just a class field would be more pythonic.","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"76e1a8fdbd8c9cb9f5d5b3abcf574be3060a3bb4","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @abc.abstractmethod"},{"line_number":35,"context_line":"    def _get_driver(self):"},{"line_number":36,"context_line":"        raise exception.NotImplemented()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_recreate_policy_association(self):"},{"line_number":39,"context_line":"        override_association \u003d self.association.copy()"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_fdec4d94","line":36,"in_reply_to":"9a061dce_ddeb6d11","updated":"2016-04-08 15:31:58.000000000","message":"Done","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c5b933a19f18305a49ac4299478d1adf6abb5aa8","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def _get_driver(self):"},{"line_number":36,"context_line":"        raise exception.NotImplemented()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_recreate_policy_association(self):"},{"line_number":39,"context_line":"        override_association \u003d self.association.copy()"},{"line_number":40,"context_line":"        override_association.update({\u0027policy_id\u0027: uuid.uuid4().hex})"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_bdbb19c3","line":38,"updated":"2016-04-07 21:39:01.000000000","message":"there should be documentation what this is showing. I can\u0027t tell reading the code. This applies to pretty much all these tests.","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"76e1a8fdbd8c9cb9f5d5b3abcf574be3060a3bb4","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def _get_driver(self):"},{"line_number":36,"context_line":"        raise exception.NotImplemented()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_recreate_policy_association(self):"},{"line_number":39,"context_line":"        override_association \u003d self.association.copy()"},{"line_number":40,"context_line":"        override_association.update({\u0027policy_id\u0027: uuid.uuid4().hex})"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_7daf9d2b","line":38,"in_reply_to":"9a061dce_bdbb19c3","updated":"2016-04-08 15:31:58.000000000","message":"Done","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c5b933a19f18305a49ac4299478d1adf6abb5aa8","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        policy_id \u003d target.pop(\u0027policy_id\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        association \u003d self.driver.get_policy_association(**target)"},{"line_number":75,"context_line":"        self.assertEqual({\u0027policy_id\u0027: (policy_id,)}, association)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def test_list_associations_for_policy(self):"},{"line_number":78,"context_line":"        another_association \u003d {\u0027policy_id\u0027: self.association[\u0027policy_id\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_5dde3ddd","line":75,"updated":"2016-04-07 21:39:01.000000000","message":"tests should be based on the documented behavior of the function. The documentation doesn\u0027t say that the returned value has a tuple so the documentation should be updated.","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"76e1a8fdbd8c9cb9f5d5b3abcf574be3060a3bb4","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        policy_id \u003d target.pop(\u0027policy_id\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        association \u003d self.driver.get_policy_association(**target)"},{"line_number":75,"context_line":"        self.assertEqual({\u0027policy_id\u0027: (policy_id,)}, association)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def test_list_associations_for_policy(self):"},{"line_number":78,"context_line":"        another_association \u003d {\u0027policy_id\u0027: self.association[\u0027policy_id\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_f8fd7b09","line":75,"in_reply_to":"9a061dce_5dde3ddd","updated":"2016-04-08 15:31:58.000000000","message":"Done","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c5b933a19f18305a49ac4299478d1adf6abb5aa8","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        self.assertEqual(2, len(associations))"},{"line_number":89,"context_line":"        self.assertIn(self.association, associations)"},{"line_number":90,"context_line":"        self.assertIn(another_association, associations)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def test_delete_association_by_endpoint(self):"},{"line_number":93,"context_line":"        association \u003d {\u0027policy_id\u0027: uuid.uuid4().hex,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_3d00a933","line":90,"updated":"2016-04-07 21:39:01.000000000","message":"these 3 asserts could be replaced with assertItemsEqual","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"76e1a8fdbd8c9cb9f5d5b3abcf574be3060a3bb4","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        self.assertEqual(2, len(associations))"},{"line_number":89,"context_line":"        self.assertIn(self.association, associations)"},{"line_number":90,"context_line":"        self.assertIn(another_association, associations)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def test_delete_association_by_endpoint(self):"},{"line_number":93,"context_line":"        association \u003d {\u0027policy_id\u0027: uuid.uuid4().hex,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_580f472e","line":90,"in_reply_to":"9a061dce_3d00a933","updated":"2016-04-08 15:31:58.000000000","message":"Good catch, thanks","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c5b933a19f18305a49ac4299478d1adf6abb5aa8","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        self.assertIn(self.association, associations)"},{"line_number":90,"context_line":"        self.assertIn(another_association, associations)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def test_delete_association_by_endpoint(self):"},{"line_number":93,"context_line":"        association \u003d {\u0027policy_id\u0027: uuid.uuid4().hex,"},{"line_number":94,"context_line":"                       \u0027endpoint_id\u0027: uuid.uuid4().hex}"},{"line_number":95,"context_line":"        self.driver.create_policy_association(**association)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_dd652d1e","line":92,"updated":"2016-04-07 21:39:01.000000000","message":"this test doesn\u0027t use the policy association created in setUp so it should be in a different class. It takes more time to run tests that have extra fixtures.","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"76e1a8fdbd8c9cb9f5d5b3abcf574be3060a3bb4","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        self.assertIn(self.association, associations)"},{"line_number":90,"context_line":"        self.assertIn(another_association, associations)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def test_delete_association_by_endpoint(self):"},{"line_number":93,"context_line":"        association \u003d {\u0027policy_id\u0027: uuid.uuid4().hex,"},{"line_number":94,"context_line":"                       \u0027endpoint_id\u0027: uuid.uuid4().hex}"},{"line_number":95,"context_line":"        self.driver.create_policy_association(**association)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_5847471d","line":92,"in_reply_to":"9a061dce_dd652d1e","updated":"2016-04-08 15:31:58.000000000","message":"I have changed it to use the one from fixtures (after adding an endpoint_id to it)","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"7b62af2d1800b39f2d2bce59fde6f34cca3522c8","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class DriverTestCase(object):"},{"line_number":20,"context_line":"    \"\"\"Test cases to validate the current endpoint policy driver behavior.\"\"\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def setUp(self):"},{"line_number":23,"context_line":"        super(DriverTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a122d0e_9bc29d32","line":20,"range":{"start_line":20,"start_character":34,"end_line":20,"end_character":41},"updated":"2016-04-29 16:30:05.000000000","message":"remove \"current\"","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"a4da5181be414696eed06ddb316bab67035e0fac","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class DriverTestCase(object):"},{"line_number":20,"context_line":"    \"\"\"Test cases to validate the current endpoint policy driver behavior.\"\"\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def setUp(self):"},{"line_number":23,"context_line":"        super(DriverTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":24,"id":"dab17558_314bb02d","line":20,"range":{"start_line":20,"start_character":34,"end_line":20,"end_character":41},"in_reply_to":"1a122d0e_9bc29d32","updated":"2016-05-05 21:48:51.000000000","message":"Done","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"7b62af2d1800b39f2d2bce59fde6f34cca3522c8","unresolved":false,"context_lines":[{"line_number":23,"context_line":"        super(DriverTestCase, self).setUp()"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"        # Load the backend before making any driver call"},{"line_number":26,"context_line":"        self.load_backend()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        self.association \u003d {\u0027policy_id\u0027: uuid.uuid4().hex,"},{"line_number":29,"context_line":"                            \u0027endpoint_id\u0027: uuid.uuid4().hex,"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a122d0e_fbfe3168","line":26,"updated":"2016-04-29 16:30:05.000000000","message":"This should be called load_fixtures rather than load_backend. load_backend in the tests already means to instantiate a manager.","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"a4da5181be414696eed06ddb316bab67035e0fac","unresolved":false,"context_lines":[{"line_number":23,"context_line":"        super(DriverTestCase, self).setUp()"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"        # Load the backend before making any driver call"},{"line_number":26,"context_line":"        self.load_backend()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        self.association \u003d {\u0027policy_id\u0027: uuid.uuid4().hex,"},{"line_number":29,"context_line":"                            \u0027endpoint_id\u0027: uuid.uuid4().hex,"}],"source_content_type":"text/x-python","patch_set":24,"id":"dab17558_91309ca0","line":26,"in_reply_to":"1a122d0e_fbfe3168","updated":"2016-05-05 21:48:51.000000000","message":"I agree with you. I will rename it to load_driver, which is actually what it does","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"7b62af2d1800b39f2d2bce59fde6f34cca3522c8","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_recreate_policy_association(self):"},{"line_number":43,"context_line":"        # Adding more than one policy association to the same target"},{"line_number":44,"context_line":"        # (endpoint_id, service_id, region_id) is not allowed"},{"line_number":45,"context_line":"        override_association \u003d self.association.copy()"},{"line_number":46,"context_line":"        override_association.update({\u0027policy_id\u0027: uuid.uuid4().hex})"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"1a122d0e_9be3bda3","line":44,"updated":"2016-04-29 16:30:05.000000000","message":"The test is showing that more then one policy association can be created. This needs more of an explanation.","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"a4da5181be414696eed06ddb316bab67035e0fac","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_recreate_policy_association(self):"},{"line_number":43,"context_line":"        # Adding more than one policy association to the same target"},{"line_number":44,"context_line":"        # (endpoint_id, service_id, region_id) is not allowed"},{"line_number":45,"context_line":"        override_association \u003d self.association.copy()"},{"line_number":46,"context_line":"        override_association.update({\u0027policy_id\u0027: uuid.uuid4().hex})"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"dab17558_11794c30","line":44,"in_reply_to":"1a122d0e_9be3bda3","updated":"2016-05-05 21:48:51.000000000","message":"Agreed, the behavior is to override the old policy to that target. I will document this","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"7b62af2d1800b39f2d2bce59fde6f34cca3522c8","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                          self.driver.check_policy_association,"},{"line_number":53,"context_line":"                          **self.association)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def test_check_policy_association(self):"},{"line_number":56,"context_line":"        self.driver.check_policy_association(**self.association)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        wrong_targets \u003d [{\u0027service_id\u0027: self.association[\u0027service_id\u0027]},"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a122d0e_9b91fdf3","line":55,"updated":"2016-04-29 16:30:05.000000000","message":"This needs a comment saying what it\u0027s testing, or needs to be simpler. I can\u0027t figure it out just by reading it.","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"a4da5181be414696eed06ddb316bab67035e0fac","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                          self.driver.check_policy_association,"},{"line_number":53,"context_line":"                          **self.association)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def test_check_policy_association(self):"},{"line_number":56,"context_line":"        self.driver.check_policy_association(**self.association)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        wrong_targets \u003d [{\u0027service_id\u0027: self.association[\u0027service_id\u0027]},"}],"source_content_type":"text/x-python","patch_set":24,"id":"dab17558_312570c2","line":55,"in_reply_to":"1a122d0e_9b91fdf3","updated":"2016-05-05 21:48:51.000000000","message":"I will do both","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"7b62af2d1800b39f2d2bce59fde6f34cca3522c8","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                          self.driver.check_policy_association,"},{"line_number":103,"context_line":"                          **self.association)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_delete_association_by_service(self):"},{"line_number":106,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":107,"context_line":"        associations \u003d [{\u0027policy_id\u0027: uuid.uuid4().hex,"},{"line_number":108,"context_line":"                         \u0027service_id\u0027: service_id,"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a122d0e_16f14401","line":105,"updated":"2016-04-29 16:30:05.000000000","message":"several tests don\u0027t use self.association, so that policy association shouldn\u0027t be created in setUp, because for these tests it was just a waste of time.","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"a4da5181be414696eed06ddb316bab67035e0fac","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                          self.driver.check_policy_association,"},{"line_number":103,"context_line":"                          **self.association)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_delete_association_by_service(self):"},{"line_number":106,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":107,"context_line":"        associations \u003d [{\u0027policy_id\u0027: uuid.uuid4().hex,"},{"line_number":108,"context_line":"                         \u0027service_id\u0027: service_id,"}],"source_content_type":"text/x-python","patch_set":24,"id":"dab17558_74db661c","line":105,"in_reply_to":"1a122d0e_16f14401","updated":"2016-05-05 21:48:51.000000000","message":"Done","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"58424dfb9c725aa7efe8119ab29e5d942131667a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import abc"},{"line_number":14,"context_line":"import six"},{"line_number":15,"context_line":"import uuid"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from keystone import exception"}],"source_content_type":"text/x-python","patch_set":26,"id":"dab17558_f8c852aa","line":14,"updated":"2016-05-10 12:58:44.000000000","message":"six should be in it\u0027s own section since it\u0027s a third party library","commit_id":"74df67e67c6cdea15f40ed297b76982a8ad6c8e1"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"50c9545ca0e739d6b5cac24ef1cb5bff8e4107ac","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import abc"},{"line_number":14,"context_line":"import six"},{"line_number":15,"context_line":"import uuid"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from keystone import exception"}],"source_content_type":"text/x-python","patch_set":26,"id":"dab17558_57b097dd","line":14,"in_reply_to":"dab17558_f8c852aa","updated":"2016-05-13 12:47:43.000000000","message":"Done","commit_id":"74df67e67c6cdea15f40ed297b76982a8ad6c8e1"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"58424dfb9c725aa7efe8119ab29e5d942131667a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    def setUp(self):"},{"line_number":25,"context_line":"        super(DriverTestCase, self).setUp()"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        self.load_fixtures()"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def create_association(self, **kwargs):"},{"line_number":30,"context_line":"        association \u003d {\u0027policy_id\u0027: uuid.uuid4().hex,"}],"source_content_type":"text/x-python","patch_set":26,"id":"dab17558_8e961c3d","line":27,"updated":"2016-05-10 12:58:44.000000000","message":"If we\u0027re just doing this in the setup anyway why not have subclasses just do this in their setup?","commit_id":"74df67e67c6cdea15f40ed297b76982a8ad6c8e1"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"50c9545ca0e739d6b5cac24ef1cb5bff8e4107ac","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    def setUp(self):"},{"line_number":25,"context_line":"        super(DriverTestCase, self).setUp()"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        self.load_fixtures()"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def create_association(self, **kwargs):"},{"line_number":30,"context_line":"        association \u003d {\u0027policy_id\u0027: uuid.uuid4().hex,"}],"source_content_type":"text/x-python","patch_set":26,"id":"dab17558_b772a30f","line":27,"in_reply_to":"dab17558_8e961c3d","updated":"2016-05-13 12:47:43.000000000","message":"I wanted to force them to override a method somehow, but your suggestion makes sense, if their tests don\u0027t work because something is missing, it\u0027s clear they need to load their fixtures in setUp","commit_id":"74df67e67c6cdea15f40ed297b76982a8ad6c8e1"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1b211030f2a8f4fac175c1d38411588f59392320","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def test_create_policy_association(self):"},{"line_number":36,"context_line":"        # There are 3 types of target permitted for policy associations:"},{"line_number":37,"context_line":"        # (endpoint), (service, region) and (service)"},{"line_number":38,"context_line":"        self.create_association(region_id\u003dNone, service_id\u003dNone)"},{"line_number":39,"context_line":"        self.create_association(endpoint_id\u003dNone)"},{"line_number":40,"context_line":"        self.create_association(region_id\u003dNone, endpoint_id\u003dNone)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"7aa08908_ca0fafdf","line":38,"updated":"2016-06-10 18:41:22.000000000","message":"The inline comment above shouldn\u0027t have to explain WHAT this code is doing, it should explain WHY it\u0027s doing it... but as-is, it\u0027s absolutely necessary to explain WHAT it\u0027s doing, because the WHAT is quite obfuscated.\n\nOverriding the dictionary created by create_association with None in this manner is SUPER confusing. I don\u0027t consider these to be readable tests at all. Refactor this so that it\u0027s clear what the endpoint-policy relationships actually are, instead of what they\u0027re not.","commit_id":"46d5f3e357c7c72de5af2ed45c3f49369fd36255"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"26b5afbbe78399118bc1b7dce73185fc59fb01ca","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def test_create_policy_association(self):"},{"line_number":36,"context_line":"        # There are 3 types of target permitted for policy associations:"},{"line_number":37,"context_line":"        # (endpoint), (service, region) and (service)"},{"line_number":38,"context_line":"        self.create_association(region_id\u003dNone, service_id\u003dNone)"},{"line_number":39,"context_line":"        self.create_association(endpoint_id\u003dNone)"},{"line_number":40,"context_line":"        self.create_association(region_id\u003dNone, endpoint_id\u003dNone)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"9ad45d7e_47557c4e","line":38,"in_reply_to":"7aa08908_ca0fafdf","updated":"2016-08-09 14:49:39.000000000","message":"Done","commit_id":"46d5f3e357c7c72de5af2ed45c3f49369fd36255"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4c11de78e2839ebee68924817ab0be59ef9b2c98","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                       \u0027region_id\u0027: None}"},{"line_number":30,"context_line":"        association.update(kwargs)"},{"line_number":31,"context_line":"        self.driver.create_policy_association(**association)"},{"line_number":32,"context_line":"        return association"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def test_create_policy_association(self):"},{"line_number":35,"context_line":"        association \u003d self.create_association(endpoint_id\u003duuid.uuid4().hex)"}],"source_content_type":"text/x-python","patch_set":32,"id":"7a8ec9b2_166b17f2","line":32,"updated":"2016-09-16 16:19:29.000000000","message":"Do you want to return the association dictionary or the created association from the driver?","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"c37e8fcc7772720a0932f3b3f0365ab51df7aaae","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                       \u0027region_id\u0027: None}"},{"line_number":30,"context_line":"        association.update(kwargs)"},{"line_number":31,"context_line":"        self.driver.create_policy_association(**association)"},{"line_number":32,"context_line":"        return association"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def test_create_policy_association(self):"},{"line_number":35,"context_line":"        association \u003d self.create_association(endpoint_id\u003duuid.uuid4().hex)"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_a542773c","line":32,"in_reply_to":"7a8ec9b2_166b17f2","updated":"2016-11-09 14:25:29.000000000","message":"driver returns None","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a25bfd6c3dfaa9f06ef979fc78f908ff962d8bea","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def test_recreate_policy_association(self):"},{"line_number":46,"context_line":"        # Creating a policy association to a target that already has a policy"},{"line_number":47,"context_line":"        # associated to it, will cause the original policy to be overridden"},{"line_number":48,"context_line":"        original_association \u003d self.create_association("},{"line_number":49,"context_line":"            service_id\u003duuid.uuid4().hex)"},{"line_number":50,"context_line":"        override_association \u003d original_association.copy()"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_941cfa14","line":47,"range":{"start_line":47,"start_character":26,"end_line":47,"end_character":27},"updated":"2016-11-08 14:53:21.000000000","message":"remove the ,","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a25bfd6c3dfaa9f06ef979fc78f908ff962d8bea","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        original_association \u003d self.create_association("},{"line_number":49,"context_line":"            service_id\u003duuid.uuid4().hex)"},{"line_number":50,"context_line":"        override_association \u003d original_association.copy()"},{"line_number":51,"context_line":"        override_association.update({\u0027policy_id\u0027: uuid.uuid4().hex})"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        self.driver.create_policy_association(**override_association)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_d4ed92f0","line":51,"updated":"2016-11-08 14:53:21.000000000","message":"the more obvious version of this is override_association[\u0027policy_id\u0027] \u003d uuid.uuid4().hex","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"cc4a6a817372d454ff41ff1345ccbd7f25f17a69","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        original_association \u003d self.create_association("},{"line_number":49,"context_line":"            service_id\u003duuid.uuid4().hex)"},{"line_number":50,"context_line":"        override_association \u003d original_association.copy()"},{"line_number":51,"context_line":"        override_association.update({\u0027policy_id\u0027: uuid.uuid4().hex})"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        self.driver.create_policy_association(**override_association)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_a0895728","line":51,"in_reply_to":"9a629dbe_d4ed92f0","updated":"2016-11-10 12:57:16.000000000","message":"++","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4c11de78e2839ebee68924817ab0be59ef9b2c98","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                                              region_id\u003duuid.uuid4().hex)"},{"line_number":63,"context_line":"        self.driver.check_policy_association(**association)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        # An association is uniquely identified by its target. Omitting any"},{"line_number":66,"context_line":"        # attribute (region_id in this case) will result in a different check"},{"line_number":67,"context_line":"        association.pop(\u0027region_id\u0027)"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"7a8ec9b2_116c01cf","line":65,"updated":"2016-09-16 16:19:29.000000000","message":"What exactly is the target? Is it a combination of association attributes?","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4c11de78e2839ebee68924817ab0be59ef9b2c98","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                          **association)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_delete_policy_association(self):"},{"line_number":74,"context_line":"        association \u003d self.create_association(endpoint_id\u003duuid.uuid4().hex)"},{"line_number":75,"context_line":"        self.driver.delete_policy_association(**association)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        self.assertRaises(exception.PolicyAssociationNotFound,"}],"source_content_type":"text/x-python","patch_set":32,"id":"7a8ec9b2_51c6899a","line":74,"updated":"2016-09-16 16:19:29.000000000","message":"You could do a:\n\n  self.driver.check_policy_association(association) \n\nhere just to make sure it actually exists before deleting it.","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a25bfd6c3dfaa9f06ef979fc78f908ff962d8bea","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                          **association)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_delete_policy_association(self):"},{"line_number":74,"context_line":"        association \u003d self.create_association(endpoint_id\u003duuid.uuid4().hex)"},{"line_number":75,"context_line":"        self.driver.delete_policy_association(**association)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        self.assertRaises(exception.PolicyAssociationNotFound,"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_345b2e89","line":74,"in_reply_to":"7a8ec9b2_51c6899a","updated":"2016-11-08 14:53:21.000000000","message":"There are already tests that show that when create_association is called the check_policy_associtaion works.","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a25bfd6c3dfaa9f06ef979fc78f908ff962d8bea","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        second \u003d self.create_association(service_id\u003duuid.uuid4().hex,"},{"line_number":95,"context_line":"                                         policy_id\u003dpolicy_id)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        associations_ref \u003d self.driver.list_associations_for_policy(policy_id)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        self.assertIn(first, associations_ref)"},{"line_number":100,"context_line":"        self.assertIn(second, associations_ref)"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_d44592b3","line":97,"range":{"start_line":97,"start_character":20,"end_line":97,"end_character":24},"updated":"2016-11-08 14:53:21.000000000","message":"what\u0027s _ref for?","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a25bfd6c3dfaa9f06ef979fc78f908ff962d8bea","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        associations_ref \u003d self.driver.list_associations_for_policy(policy_id)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        self.assertIn(first, associations_ref)"},{"line_number":100,"context_line":"        self.assertIn(second, associations_ref)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_delete_association_by_endpoint(self):"},{"line_number":103,"context_line":"        endpoint_id \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_f42b76e9","line":100,"updated":"2016-11-08 14:53:21.000000000","message":"this test should also assert that there are only 2 in the list.\n\nThis could be done using assertItemsEqual rather than separate assertIn.","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"cc4a6a817372d454ff41ff1345ccbd7f25f17a69","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        associations_ref \u003d self.driver.list_associations_for_policy(policy_id)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        self.assertIn(first, associations_ref)"},{"line_number":100,"context_line":"        self.assertIn(second, associations_ref)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_delete_association_by_endpoint(self):"},{"line_number":103,"context_line":"        endpoint_id \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_8072930f","line":100,"in_reply_to":"9a629dbe_f42b76e9","updated":"2016-11-10 12:57:16.000000000","message":"++\n\nasserting the size might not work sometimes (if we have things added in a setUp step, for example), but that\u0027s not the case.","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"}],"keystone/tests/unit/endpoint_policy/backends/test_sql.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c5b933a19f18305a49ac4299478d1adf6abb5aa8","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class SQLDriverTestCase(test_base.DriverTestCase,"},{"line_number":32,"context_line":"                        core_sql.BaseBackendSqlTests):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def _get_driver(self):"},{"line_number":35,"context_line":"        return self.endpoint_policy_api.driver"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_206d22cc","line":32,"updated":"2016-04-07 21:39:01.000000000","message":"don\u0027t use this. For some reason it does self.load_backends() and self.load_fixtures(), which these tests should not use.","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"76e1a8fdbd8c9cb9f5d5b3abcf574be3060a3bb4","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class SQLDriverTestCase(test_base.DriverTestCase,"},{"line_number":32,"context_line":"                        core_sql.BaseBackendSqlTests):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def _get_driver(self):"},{"line_number":35,"context_line":"        return self.endpoint_policy_api.driver"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a061dce_fc61e6a9","line":32,"in_reply_to":"9a061dce_206d22cc","updated":"2016-04-08 15:31:58.000000000","message":"Done","commit_id":"88fd38b067440954f2edbe31142e1c026f288094"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"7b62af2d1800b39f2d2bce59fde6f34cca3522c8","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @property"},{"line_number":37,"context_line":"    def driver(self):"},{"line_number":38,"context_line":"        return sql_driver.EndpointPolicy()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def load_backend(self):"},{"line_number":41,"context_line":"        self.useFixture(database.Database())"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a122d0e_361d600f","line":38,"updated":"2016-04-29 16:30:05.000000000","message":"This shouldn\u0027t be created every time the property is used. Create a single instance and re-use it.","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"a4da5181be414696eed06ddb316bab67035e0fac","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @property"},{"line_number":37,"context_line":"    def driver(self):"},{"line_number":38,"context_line":"        return sql_driver.EndpointPolicy()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def load_backend(self):"},{"line_number":41,"context_line":"        self.useFixture(database.Database())"}],"source_content_type":"text/x-python","patch_set":24,"id":"dab17558_b75f9074","line":38,"in_reply_to":"1a122d0e_361d600f","updated":"2016-05-05 21:48:51.000000000","message":"++ nice catch","commit_id":"496330fc26b330c247573594e28140ff79055cdd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a25bfd6c3dfaa9f06ef979fc78f908ff962d8bea","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from keystone.tests import unit"},{"line_number":16,"context_line":"from keystone.tests.unit.backend import core_sql"},{"line_number":17,"context_line":"from keystone.tests.unit.endpoint_policy.backends import test_base"},{"line_number":18,"context_line":"from keystone.tests.unit.ksfixtures import database"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class SQLModelTestCase(core_sql.BaseBackendSqlModels):"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_1499ca1f","line":18,"updated":"2016-11-08 14:53:21.000000000","message":"there\u0027s more imports than lines of code!","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a25bfd6c3dfaa9f06ef979fc78f908ff962d8bea","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    @property"},{"line_number":42,"context_line":"    def driver(self):"},{"line_number":43,"context_line":"        return self._driver"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_f95e0fe8","line":43,"updated":"2016-11-08 14:53:21.000000000","message":"This is a lot of complication for what should be simple. Keep tests simple. Just do self.driver \u003d sql_driver.EndpointPolicy() in __init__.","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"cc4a6a817372d454ff41ff1345ccbd7f25f17a69","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    @property"},{"line_number":42,"context_line":"    def driver(self):"},{"line_number":43,"context_line":"        return self._driver"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_5b75caf7","line":43,"in_reply_to":"9a629dbe_f95e0fe8","updated":"2016-11-10 12:57:16.000000000","message":"++","commit_id":"c4784d77f0e45e8993e34847c5f50704b50219ce"}]}
