)]}'
{"neutron/tests/unit/conf/policies/test_auto_allocated_topology.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"83ecdc26d31e37bfb7984310efa0252135b242f2","unresolved":true,"context_lines":[{"line_number":26,"context_line":"        self.target \u003d {"},{"line_number":27,"context_line":"            \u0027project_id\u0027: self.project_id}"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def test_system_reader_can_get_allocated_topology(self):"},{"line_number":30,"context_line":"        self.assertTrue("},{"line_number":31,"context_line":"            policy.enforce(self.system_reader_ctx,"},{"line_number":32,"context_line":"                           \u0027get_auto_allocated_topology\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"d44881a8_c4dd80d1","line":29,"updated":"2021-03-22 13:08:29.000000000","message":"nit: There are a bunch of different ways you can organize these tests and it\u0027s obviously neutron\u0027s decision how to maintain those tests.\n\nBut, we\u0027ve seen other projects organize these tests by persona, which helps group all the relevant behavior for one particular persona.\n\n  class SystemAdminAutoAllocatedTopologyTests(base.PolicyBaseTestCase):\n\n      def test_user_can_get_topology(self):\n          # asserts True for any project\n\n      def test_user_can_delete_topology(self):\n          # asserts True for any project\n\n  class SystemReaderAutoAllocatedTopologyTests(base.PolicyBaseTestCase):\n\n      def test_user_can_get_topology(self):\n          # asserts True for any project\n\n      def test_user_cannot_delete_topology(self):\n          # asserts False for any project\n\n  class ProjectAdminAutoAllocatedTopologyTests(base.PolicyBaseTestCase):\n\n      def test_user_can_get_topology(self):\n          # asserts True\n\n      def test_user_cannot_get_topology_for_other_project(self):\n          # assert False\n\n      def test_user_can_delete_topology(self):\n          # asserts True\n\n      def test_user_cannot_delete_topology_for_other_project(self):\n          # asserts False\n\n  class ProjectReaderAutoAllocatedTopologyTests(base.PolicyBaseTestCase):\n      ...\n\n\nMentioning it here in case we want to use that organization, or a derivative of it, before we get way down the testing road.","commit_id":"2409638eb97419195461c09757edef466231c292"}]}
