)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"07c56fe8664074ee26e5f9659be760a0f91f9efb","unresolved":false,"context_lines":[{"line_number":11,"context_line":"by the direct path."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I555ca5e4ae6bd89775d8ef95940b6915f4cef4da"},{"line_number":14,"context_line":"Closes-Bug: 1505407"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a2ca52d_60abed75","line":14,"updated":"2015-10-16 15:28:26.000000000","message":"the bug reports says that it will still require a change to our paste.ini - https://bugs.launchpad.net/keystonemiddleware/+bug/1505407\n\nWondering if this should be Partial-Bug since it sounds like another patch will be on the way?","commit_id":"03329a81773069c877f4097ee747a1ee1a7b0b0b"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"9e0252a0fec0eded65ce419de037174fb6613fa0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"by the direct path."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I555ca5e4ae6bd89775d8ef95940b6915f4cef4da"},{"line_number":14,"context_line":"Closes-Bug: 1505407"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a2ca52d_801ba9c9","line":14,"in_reply_to":"5a2ca52d_60abed75","updated":"2015-10-16 15:31:24.000000000","message":"Done","commit_id":"03329a81773069c877f4097ee747a1ee1a7b0b0b"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"9bf34d8aed503ce2ee09405d78661fa6175e2b59","unresolved":false,"context_lines":[{"line_number":11,"context_line":"by the direct path."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I555ca5e4ae6bd89775d8ef95940b6915f4cef4da"},{"line_number":14,"context_line":"Closes-Bug: 1505407"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa80f949_d263f5da","line":14,"in_reply_to":"5a2ca52d_801ba9c9","updated":"2015-11-05 15:34:21.000000000","message":"Sorry Lance I was mistaken here. keystonemiddleware does not have a paste.ini file to be changed.  The change would have to be done in other projects.  I think this should be Closes-Bug","commit_id":"03329a81773069c877f4097ee747a1ee1a7b0b0b"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"035968d7e4d2a5c7a9fdfb896cc8d189201d444e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"by the direct path."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I555ca5e4ae6bd89775d8ef95940b6915f4cef4da"},{"line_number":14,"context_line":"Partial-Bug: 1505407"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1a26ad4f_a7f9bb4f","line":14,"updated":"2015-10-28 02:11:36.000000000","message":"Why is this Partial-Bug and not Closes-Bug?","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"03c7d294cd3ab03130b766fb28c85073c9158188","unresolved":false,"context_lines":[{"line_number":11,"context_line":"by the direct path."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I555ca5e4ae6bd89775d8ef95940b6915f4cef4da"},{"line_number":14,"context_line":"Partial-Bug: 1505407"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa80f949_b74e6394","line":14,"in_reply_to":"1a26ad4f_a7f9bb4f","updated":"2015-11-05 15:34:44.000000000","message":"Done","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"}],"keystonemiddleware/tests/unit/test_entry_points.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"035968d7e4d2a5c7a9fdfb896cc8d189201d444e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 OpenStack Foundation."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a26ad4f_479547e2","line":1,"updated":"2015-10-28 02:11:36.000000000","message":"Remove the copyright line since you don\u0027t work for the Foundation.","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"03c7d294cd3ab03130b766fb28c85073c9158188","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 OpenStack Foundation."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa80f949_0174cdfa","line":1,"in_reply_to":"1a26ad4f_479547e2","updated":"2015-11-05 15:34:44.000000000","message":"Done","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"ffc8f45613dad6dda9995d0b566c7016f84c63f9","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslotest.base import BaseTestCase"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class TestPasteDeploymentEntryPoints(BaseTestCase):"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def test_entry_points(self):"},{"line_number":23,"context_line":"        expected_factory_names \u003d ["}],"source_content_type":"text/x-python","patch_set":6,"id":"fa80f949_60d88554","line":20,"updated":"2015-11-03 19:23:49.000000000","message":"Use keystonemiddleware.tests.unit.utils.BaseTestCase instead.","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"03c7d294cd3ab03130b766fb28c85073c9158188","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslotest.base import BaseTestCase"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class TestPasteDeploymentEntryPoints(BaseTestCase):"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def test_entry_points(self):"},{"line_number":23,"context_line":"        expected_factory_names \u003d ["}],"source_content_type":"text/x-python","patch_set":6,"id":"fa80f949_416ad51b","line":20,"in_reply_to":"fa80f949_60d88554","updated":"2015-11-05 15:34:44.000000000","message":"Done","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"035968d7e4d2a5c7a9fdfb896cc8d189201d444e","unresolved":false,"context_lines":[{"line_number":24,"context_line":"            \u0027auth_token\u0027,"},{"line_number":25,"context_line":"            \u0027audit\u0027,"},{"line_number":26,"context_line":"            \u0027auth_ec2\u0027,"},{"line_number":27,"context_line":"            \u0027auth_S3\u0027"},{"line_number":28,"context_line":"        ]"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"        em \u003d stevedore.ExtensionManager(\u0027paste.filter_factory\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a26ad4f_c2db85ec","line":27,"updated":"2015-10-28 02:11:36.000000000","message":"leave a trailing , so it\u0027s easier to update the list. Also, put these in alphabetical order.","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"03c7d294cd3ab03130b766fb28c85073c9158188","unresolved":false,"context_lines":[{"line_number":24,"context_line":"            \u0027auth_token\u0027,"},{"line_number":25,"context_line":"            \u0027audit\u0027,"},{"line_number":26,"context_line":"            \u0027auth_ec2\u0027,"},{"line_number":27,"context_line":"            \u0027auth_S3\u0027"},{"line_number":28,"context_line":"        ]"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"        em \u003d stevedore.ExtensionManager(\u0027paste.filter_factory\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa80f949_216f912c","line":27,"in_reply_to":"1a26ad4f_c2db85ec","updated":"2015-11-05 15:34:44.000000000","message":"Done","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"035968d7e4d2a5c7a9fdfb896cc8d189201d444e","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"        em \u003d stevedore.ExtensionManager(\u0027paste.filter_factory\u0027)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"        extension_name_list \u003d [extension.name for extension in em]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        for name in expected_factory_names:"},{"line_number":35,"context_line":"            self.assertIn(name, extension_name_list)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a26ad4f_22bb5974","line":32,"updated":"2015-10-28 02:11:36.000000000","message":"suggest change the variable name to factory_names","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"03c7d294cd3ab03130b766fb28c85073c9158188","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"        em \u003d stevedore.ExtensionManager(\u0027paste.filter_factory\u0027)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"        extension_name_list \u003d [extension.name for extension in em]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        for name in expected_factory_names:"},{"line_number":35,"context_line":"            self.assertIn(name, extension_name_list)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa80f949_a161413b","line":32,"in_reply_to":"1a26ad4f_22bb5974","updated":"2015-11-05 15:34:44.000000000","message":"Done","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"035968d7e4d2a5c7a9fdfb896cc8d189201d444e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        extension_name_list \u003d [extension.name for extension in em]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        for name in expected_factory_names:"},{"line_number":35,"context_line":"            self.assertIn(name, extension_name_list)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a26ad4f_62c151e4","line":35,"updated":"2015-10-28 02:11:36.000000000","message":"Use the ContainsAll matcher to make this code more explicit. https://github.com/testing-cabal/testtools/blob/master/testtools/matchers/_datastructures.py#L21\n\nThe test should also verify that auth_token is an instance of keystonemiddleware.auth_token:filter_factory (or whatever it is), and the rest of them are as expected.","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"4880e0b99e460a7f02bcd2140475372a8d6248f4","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        extension_name_list \u003d [extension.name for extension in em]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        for name in expected_factory_names:"},{"line_number":35,"context_line":"            self.assertIn(name, extension_name_list)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a26ad4f_72a58302","line":35,"in_reply_to":"1a26ad4f_62c151e4","updated":"2015-10-28 19:56:49.000000000","message":"Brant I am struggling on this last part.  Through stevedore i can get the entry point but that is an Entrypoint object. \n\nand keystonemiddleware.auth_token.filter_factory.__class__ is a function\n\nCan you help me on how to verify they are instances in keystonemiddleware?","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"ffc8f45613dad6dda9995d0b566c7016f84c63f9","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        extension_name_list \u003d [extension.name for extension in em]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        for name in expected_factory_names:"},{"line_number":35,"context_line":"            self.assertIn(name, extension_name_list)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa80f949_c0ca914f","line":35,"in_reply_to":"1a26ad4f_72a58302","updated":"2015-11-03 19:23:49.000000000","message":"extension.plugin is the filter factory:\n\n (Pdb) e \u003d [m for m in em if m.name\u003d\u003d\u0027auth_token\u0027][0]\n (Pdb) e.plugin\n \u003cfunction filter_factory at 0x7f4285df1758\u003e\n (Pdb) from keystonemiddleware import auth_token\n (Pdb) auth_token.filter_factory\n \u003cfunction filter_factory at 0x7f4285df1758\u003e\n (Pdb) auth_token.filter_factory is e.plugin\n True","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"03c7d294cd3ab03130b766fb28c85073c9158188","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        extension_name_list \u003d [extension.name for extension in em]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        for name in expected_factory_names:"},{"line_number":35,"context_line":"            self.assertIn(name, extension_name_list)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa80f949_81d51dba","line":35,"in_reply_to":"fa80f949_c0ca914f","updated":"2015-11-05 15:34:44.000000000","message":"Thank you for helping me with this.  Doing this I was able to find that since the names in the setup.cfg were different than the file name they were not working correctly.","commit_id":"f53fd747f6ef1c5aab8a95d6387f8f733aed5ed3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"521c69052a6090490b791cd5650da39212dadc93","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        # Ensure that we can create instance of the filter factories"},{"line_number":42,"context_line":"        for factory_name in expected_factory_names:"},{"line_number":43,"context_line":"            e \u003d [m for m in em if m.name \u003d\u003d factory_name][0]"},{"line_number":44,"context_line":"            self.assertEqual(globals()[factory_name].filter_factory, e.plugin)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_43b892e5","line":44,"updated":"2015-11-05 17:26:40.000000000","message":"suggest do getattr(keystonemiddleware, factory_name).\n\nOtherwise add a comment explaining what this is doing since it\u0027s not obvious. The comment should also explain why the #noqa lines are in the imports above.","commit_id":"16bb306298944da33302ab605937bdd8800a6070"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"a1570642e48ba7a87900b3247e434bbc86af45b8","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        # Ensure that we can create instance of the filter factories"},{"line_number":42,"context_line":"        for factory_name in expected_factory_names:"},{"line_number":43,"context_line":"            e \u003d [m for m in em if m.name \u003d\u003d factory_name][0]"},{"line_number":44,"context_line":"            self.assertEqual(globals()[factory_name].filter_factory, e.plugin)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_ce47c949","line":44,"in_reply_to":"fa80f949_43b892e5","updated":"2015-11-05 17:45:35.000000000","message":"I like getattr much better since it is increasing the readability. Thank you.","commit_id":"16bb306298944da33302ab605937bdd8800a6070"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"fbf6c5d84690b96ca19349be14fbc19425c979cf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":3,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":4,"context_line":"# a copy of the License at"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa80f949_979c6610","line":1,"updated":"2015-11-06 05:05:52.000000000","message":"Remove this to be consistent with the other modules.","commit_id":"01a7c937b5b5e0df353c498898f87d4335a18e41"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"0f67d2effcef29e6adf2c56e326292fa17b6fdf2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":3,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":4,"context_line":"# a copy of the License at"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa80f949_d2dae04a","line":1,"in_reply_to":"fa80f949_979c6610","updated":"2015-11-06 16:49:05.000000000","message":"Done","commit_id":"01a7c937b5b5e0df353c498898f87d4335a18e41"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"fbf6c5d84690b96ca19349be14fbc19425c979cf","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                        matchers.ContainsAll(expected_factory_names))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # Ensure that we can create instances of the filter factories"},{"line_number":39,"context_line":"        for factory_name in expected_factory_names:"},{"line_number":40,"context_line":"            e \u003d [m for m in em if m.name \u003d\u003d factory_name][0]"},{"line_number":41,"context_line":"            factory_name_obj \u003d getattr(keystonemiddleware, factory_name)"},{"line_number":42,"context_line":"            self.assertEqual(factory_name_obj.filter_factory, e.plugin)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa80f949_8cd2185b","line":39,"updated":"2015-11-06 05:05:52.000000000","message":"IMO you could make this whole thing much more obvious by using something more like:\n\n  expected_factories \u003d set([\u0027keystonemiddleware.auth_token:filter_factory\u0027, ...])\n  actual_factories \u003d set([\u0027{0.__module__}:{0.__name__}\u0027.format(extension.plugin)\n                                       for extension in em])\n  self.assertEqual(expected_factories, actual_factories)","commit_id":"01a7c937b5b5e0df353c498898f87d4335a18e41"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"0f67d2effcef29e6adf2c56e326292fa17b6fdf2","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                        matchers.ContainsAll(expected_factory_names))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # Ensure that we can create instances of the filter factories"},{"line_number":39,"context_line":"        for factory_name in expected_factory_names:"},{"line_number":40,"context_line":"            e \u003d [m for m in em if m.name \u003d\u003d factory_name][0]"},{"line_number":41,"context_line":"            factory_name_obj \u003d getattr(keystonemiddleware, factory_name)"},{"line_number":42,"context_line":"            self.assertEqual(factory_name_obj.filter_factory, e.plugin)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa80f949_adda5de6","line":39,"in_reply_to":"fa80f949_8cd2185b","updated":"2015-11-06 16:49:05.000000000","message":"@David this is really cool. I didn\u0027t even realize you could do this in Python. :)","commit_id":"01a7c937b5b5e0df353c498898f87d4335a18e41"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fef1f23e88b6a378d2d029628c7ff1f8c6dbc15a","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # Ensure that we can create instances of the filter factories"},{"line_number":39,"context_line":"        for factory_name in expected_factory_names:"},{"line_number":40,"context_line":"            e \u003d [m for m in em if m.name \u003d\u003d factory_name][0]"},{"line_number":41,"context_line":"            factory_name_obj \u003d getattr(keystonemiddleware, factory_name)"},{"line_number":42,"context_line":"            self.assertEqual(factory_name_obj.filter_factory, e.plugin)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa80f949_8ec0e1e1","line":40,"updated":"2015-11-05 17:57:50.000000000","message":"I think it would be clearer to loop through the factories rather than pick out the one needed... e.g.\n\n for extension in em:\n     if extension.name not in expected_factory_names:\n         continue  # skip factory that\u0027s from other package.\n\n     # The middleware extension name happens to match the module name\n     factory \u003d getattr(keystonemiddleware, extension.name)\n\n     self.assertEqual(factory, extension.plugin)","commit_id":"01a7c937b5b5e0df353c498898f87d4335a18e41"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"0f67d2effcef29e6adf2c56e326292fa17b6fdf2","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # Ensure that we can create instances of the filter factories"},{"line_number":39,"context_line":"        for factory_name in expected_factory_names:"},{"line_number":40,"context_line":"            e \u003d [m for m in em if m.name \u003d\u003d factory_name][0]"},{"line_number":41,"context_line":"            factory_name_obj \u003d getattr(keystonemiddleware, factory_name)"},{"line_number":42,"context_line":"            self.assertEqual(factory_name_obj.filter_factory, e.plugin)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa80f949_6d2a3592","line":40,"in_reply_to":"fa80f949_8ec0e1e1","updated":"2015-11-06 16:49:05.000000000","message":"Good call Brant.  This is much cleaner than the code I have.","commit_id":"01a7c937b5b5e0df353c498898f87d4335a18e41"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"c25892fc6ad4fa03b29365568eebba7d433dd34d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        # Ensure that all factories are defined by their names"},{"line_number":36,"context_line":"        self.assertThat(actual_factories, matchers.ContainsAll(exp_factories))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # Ensure that we can create instances of the filter factories"},{"line_number":39,"context_line":"        for extension in em:"},{"line_number":40,"context_line":"            # Skip factories that are from other packages"},{"line_number":41,"context_line":"            if extension.name not in expected_factory_names:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa80f949_48ecfcf2","line":38,"updated":"2015-11-06 18:05:06.000000000","message":"I think the whole for-loop is a little overkill. You verified the loaded extensions by name above. I think we can trust stevedore to properly load them.","commit_id":"ccbbe4cdef2635b8efa1c8349e31ac65dd0292f7"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"621050259d198ba60484613987fd78fca3951a34","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        # Ensure that all factories are defined by their names"},{"line_number":36,"context_line":"        self.assertThat(actual_factories, matchers.ContainsAll(exp_factories))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # Ensure that we can create instances of the filter factories"},{"line_number":39,"context_line":"        for extension in em:"},{"line_number":40,"context_line":"            # Skip factories that are from other packages"},{"line_number":41,"context_line":"            if extension.name not in expected_factory_names:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa80f949_c8378c4b","line":38,"in_reply_to":"fa80f949_48ecfcf2","updated":"2015-11-06 18:24:17.000000000","message":"Your putting me between a rock and a hard place :)  I think it is still beneficial, to double check that it is created correctly.  Brant was the one that requested to check that the instances were the same, he may have more information on why he recommended this.","commit_id":"ccbbe4cdef2635b8efa1c8349e31ac65dd0292f7"}],"keystonemiddleware/tests/unit/test_opts.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a60dcfed7d2b80e98be962bb2eb183a9562b9550","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        self._test_list_auth_token_opts(extension.obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_entry_points(self):"},{"line_number":89,"context_line":"        expected_factory_names \u003d ["},{"line_number":90,"context_line":"            \u0027auth_token\u0027,"},{"line_number":91,"context_line":"            \u0027audit\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_4d11415c","line":88,"updated":"2015-10-16 18:28:32.000000000","message":"this test doesn\u0027t belong in test_opts since it\u0027s not testing options.","commit_id":"1445e6ce32cf9f26358733b712059e2d452d9ff2"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"58c5de026e02b1d20cb28430f092a03c54e3a7a4","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        self._test_list_auth_token_opts(extension.obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_entry_points(self):"},{"line_number":89,"context_line":"        expected_factory_names \u003d ["},{"line_number":90,"context_line":"            \u0027auth_token\u0027,"},{"line_number":91,"context_line":"            \u0027audit\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_36c9b659","line":88,"in_reply_to":"5a2ca52d_4d11415c","updated":"2015-10-16 20:54:56.000000000","message":"Looking through all the testing files I can\u0027t find a good one to put it in.  Should I make a file called test_entry_points?","commit_id":"1445e6ce32cf9f26358733b712059e2d452d9ff2"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"c4a23b44426a1becdc1edd056dab8ee239b3e2a4","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        ]"},{"line_number":95,"context_line":"        em \u003d stevedore.ExtensionManager(\u0027paste.filter_factory\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self.assertEqual(len(expected_factory_names), len(em.extensions))"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        for extension in em:"},{"line_number":100,"context_line":"            self.assertIn(extension.name, expected_factory_names)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_391f706d","line":97,"updated":"2015-10-16 16:39:38.000000000","message":"Will this test fail if other packages that used that entrypoint are installed or is it somehow limiting what it is looking at?","commit_id":"1445e6ce32cf9f26358733b712059e2d452d9ff2"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a60dcfed7d2b80e98be962bb2eb183a9562b9550","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        ]"},{"line_number":95,"context_line":"        em \u003d stevedore.ExtensionManager(\u0027paste.filter_factory\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self.assertEqual(len(expected_factory_names), len(em.extensions))"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        for extension in em:"},{"line_number":100,"context_line":"            self.assertIn(extension.name, expected_factory_names)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_cd2eb1a4","line":97,"updated":"2015-10-16 18:28:32.000000000","message":"use assertItemsEqual","commit_id":"1445e6ce32cf9f26358733b712059e2d452d9ff2"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"a62350e8c30a7ce28618486768fa93221335bab1","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        ]"},{"line_number":95,"context_line":"        em \u003d stevedore.ExtensionManager(\u0027paste.filter_factory\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self.assertEqual(len(expected_factory_names), len(em.extensions))"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        for extension in em:"},{"line_number":100,"context_line":"            self.assertIn(extension.name, expected_factory_names)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_74716f43","line":97,"in_reply_to":"5a2ca52d_347bf78d","updated":"2015-10-16 16:51:31.000000000","message":"I\u0027ll have to find one... Maybe the setuptools documentation. Any package can register its code as an entry point. This is how plugins work. A library in this case PasteDeploy publishes well known entry points like paste.filter_factory and then other libraries add their instances of those entry points. Then later PasteDeploy can find *all* of them.","commit_id":"1445e6ce32cf9f26358733b712059e2d452d9ff2"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"3fa0ddf3d37b8595fe942d38362a6f9370574c9f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        ]"},{"line_number":95,"context_line":"        em \u003d stevedore.ExtensionManager(\u0027paste.filter_factory\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self.assertEqual(len(expected_factory_names), len(em.extensions))"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        for extension in em:"},{"line_number":100,"context_line":"            self.assertIn(extension.name, expected_factory_names)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_347bf78d","line":97,"in_reply_to":"5a2ca52d_391f706d","updated":"2015-10-16 16:46:15.000000000","message":"This is just looking at the setup.conf filter_factory. \n\nSorry but could you explain more about what happens when a package that uses the entry point is installed? or just link me to a doc or something :p","commit_id":"1445e6ce32cf9f26358733b712059e2d452d9ff2"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"58c5de026e02b1d20cb28430f092a03c54e3a7a4","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        ]"},{"line_number":95,"context_line":"        em \u003d stevedore.ExtensionManager(\u0027paste.filter_factory\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self.assertEqual(len(expected_factory_names), len(em.extensions))"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        for extension in em:"},{"line_number":100,"context_line":"            self.assertIn(extension.name, expected_factory_names)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_335d4847","line":97,"in_reply_to":"5a2ca52d_cd2eb1a4","updated":"2015-10-16 20:54:56.000000000","message":"@Brant assertItemsEqual sorts and compares lists the problem here is that we are comparing the number of stevedor objects to the number of names in the list.   For this reason that function would not work. \n\n@David I did a bunch of research and since anyone can change the config file all we want to do is make sure those entry points are still there. So what i did differently is; \n\nI generate a list of the entry point names and make sure the expected names are in that list.  This should fix your worry about extra entry points being in the extension list.","commit_id":"1445e6ce32cf9f26358733b712059e2d452d9ff2"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7e7b678e9dfb7d35fd73167fdc5d03a61bc64e8e","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            extension_name_list.append(extension.name)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        for name in expected_factory_names:"},{"line_number":107,"context_line":"            self.assertIn(name, extension_name_list)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_e73473df","line":107,"updated":"2015-10-19 17:12:20.000000000","message":"can\u0027t these two loops be combined? \n\n    for extension in em:\n        self.assertIn(extension.name, expected_factory_names)","commit_id":"02ca8639122c06903ed622fb208ed8c5326abf28"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"7cc7e696ac1decd4c64f6106cf85a907307efd5c","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            extension_name_list.append(extension.name)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        for name in expected_factory_names:"},{"line_number":107,"context_line":"            self.assertIn(name, extension_name_list)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_9b82b651","line":107,"in_reply_to":"3a29b11f_e73473df","updated":"2015-10-19 18:46:07.000000000","message":"Sorry Lance they can\u0027t because the extension_name_list could have more then just the expected entry points.  It is possible for other packages to install entry points.  This way we are making sure the excepted ones are in there and not have to worry about ones that could be assigned by packages.","commit_id":"02ca8639122c06903ed622fb208ed8c5326abf28"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"fc5f1f0273a75e6151df92997a88a1238110397e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            self.fail(\u0027keystonemiddleware.auth_token not found\u0027)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        self._test_list_auth_token_opts(extension.obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class TestPasteDeploymentEntryPoints(utils.TestCase):"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_fb55ea1c","line":87,"updated":"2015-10-19 18:54:44.000000000","message":"I agree with Brant about the location of the tests. I don\u0027t have a problem with test_entry_points.py","commit_id":"6dcf650734d4afa581d097a8dfb483f7991d6989"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"419b97eac6235d3acfa437ce0fd617b05a11f15c","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            self.fail(\u0027keystonemiddleware.auth_token not found\u0027)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        self._test_list_auth_token_opts(extension.obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class TestPasteDeploymentEntryPoints(utils.TestCase):"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_b6d8e754","line":87,"in_reply_to":"3a29b11f_fb55ea1c","updated":"2015-10-19 19:01:08.000000000","message":"Done","commit_id":"6dcf650734d4afa581d097a8dfb483f7991d6989"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"fc5f1f0273a75e6151df92997a88a1238110397e","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self._test_list_auth_token_opts(extension.obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class TestPasteDeploymentEntryPoints(utils.TestCase):"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def test_entry_points(self):"},{"line_number":92,"context_line":"        expected_factory_names \u003d ["}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_fba72a4d","line":89,"updated":"2015-10-19 18:54:44.000000000","message":"I would expect this to work with BaseTestCase instead of TestCase. I doubt we need all of the setup from TestCase here.","commit_id":"6dcf650734d4afa581d097a8dfb483f7991d6989"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"419b97eac6235d3acfa437ce0fd617b05a11f15c","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self._test_list_auth_token_opts(extension.obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class TestPasteDeploymentEntryPoints(utils.TestCase):"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def test_entry_points(self):"},{"line_number":92,"context_line":"        expected_factory_names \u003d ["}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_96d36b38","line":89,"in_reply_to":"3a29b11f_fba72a4d","updated":"2015-10-19 19:01:08.000000000","message":"Done","commit_id":"6dcf650734d4afa581d097a8dfb483f7991d6989"}]}
