)]}'
{"neutron/tests/unit/metaplugin/test_metaplugin.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"90a5b2c6eb0c39293bec16230974f5f393fe6e4b","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            self.plugin.get_router(self.context, router_ret1[\u0027id\u0027])"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def test_extension_method(self):"},{"line_number":309,"context_line":"        fake1_before_fake2 \u003d False"},{"line_number":310,"context_line":"        for flavor, plugin in self.plugin.plugins.items():"},{"line_number":311,"context_line":"            if flavor \u003d\u003d \u0027fake1\u0027:"},{"line_number":312,"context_line":"                fake1_before_fake2 \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_ff5e6244","line":309,"updated":"2014-10-21 20:50:06.000000000","message":"This probably warrants some docstring/comment explaining that the dict items can be in any order.","commit_id":"e0af8e1dd0cdee90027ec67d3372b927dba8680e"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"f6bd639e2750ed9dab8809c018ed1e487956aa4c","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            self.plugin.get_router(self.context, router_ret1[\u0027id\u0027])"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def test_extension_method(self):"},{"line_number":309,"context_line":"        fake1_before_fake2 \u003d False"},{"line_number":310,"context_line":"        for flavor, plugin in self.plugin.plugins.items():"},{"line_number":311,"context_line":"            if flavor \u003d\u003d \u0027fake1\u0027:"},{"line_number":312,"context_line":"                fake1_before_fake2 \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_9df547cd","line":309,"in_reply_to":"9aa7fdbe_ff5e6244","updated":"2014-10-22 14:44:52.000000000","message":"Done","commit_id":"e0af8e1dd0cdee90027ec67d3372b927dba8680e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"90a5b2c6eb0c39293bec16230974f5f393fe6e4b","unresolved":false,"context_lines":[{"line_number":319,"context_line":"            self.assertEqual(\u0027fake1\u0027, self.plugin.fake_func())"},{"line_number":320,"context_line":"        else:"},{"line_number":321,"context_line":"            self.assertEqual(\u0027fake2\u0027, self.plugin.fake_func())"},{"line_number":322,"context_line":"        self.assertEqual(\u0027fake2\u0027, self.plugin.fake_func2())"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    def test_extension_not_implemented_method(self):"},{"line_number":325,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_fa41103a","line":322,"updated":"2014-10-21 20:50:06.000000000","message":"Sort of confused here. If fake1 is first, then L319 will check fake_func(), but there won\u0027t be any fake_func2() right (if I\u0027m looking at the right fake file)?\n\nIs the goal to only check the first fake or all fake plugins?","commit_id":"e0af8e1dd0cdee90027ec67d3372b927dba8680e"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"6333c09df69d4ae82a86fc4bb0e4160531574694","unresolved":false,"context_lines":[{"line_number":319,"context_line":"            self.assertEqual(\u0027fake1\u0027, self.plugin.fake_func())"},{"line_number":320,"context_line":"        else:"},{"line_number":321,"context_line":"            self.assertEqual(\u0027fake2\u0027, self.plugin.fake_func())"},{"line_number":322,"context_line":"        self.assertEqual(\u0027fake2\u0027, self.plugin.fake_func2())"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    def test_extension_not_implemented_method(self):"},{"line_number":325,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_022105fb","line":322,"in_reply_to":"9aa7fdbe_19198188","updated":"2014-10-22 05:16:15.000000000","message":"I checked with Nachi (nati_ueno on IRC) who \"owns\" the metaplugin, and he said that it is due for deprecation in Kilo. So I think we can use this hack to make the tests pass, and not put much more effort into it.","commit_id":"e0af8e1dd0cdee90027ec67d3372b927dba8680e"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"c3fd62975df0e1bf51daa9dfcbd32dad9eeeb674","unresolved":false,"context_lines":[{"line_number":319,"context_line":"            self.assertEqual(\u0027fake1\u0027, self.plugin.fake_func())"},{"line_number":320,"context_line":"        else:"},{"line_number":321,"context_line":"            self.assertEqual(\u0027fake2\u0027, self.plugin.fake_func())"},{"line_number":322,"context_line":"        self.assertEqual(\u0027fake2\u0027, self.plugin.fake_func2())"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    def test_extension_not_implemented_method(self):"},{"line_number":325,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_19198188","line":322,"in_reply_to":"9aa7fdbe_fa41103a","updated":"2014-10-21 22:39:01.000000000","message":"This UT as far as I can tell is simply testing if the getattr function for self.plugin is working correctly. \nIn the setup for this UT it loads both fake plugins into the metaplugin, fake plugin 1 only has the fake_func function, where as fake plugin 2 inherits fake plugin 1 overrides fake_func and adds the fake_func2 function. \n\nWhen self.plugin.fake_func is called the code in self.plugin.__getattr__ looks through the list of plugins stored in self.plugin.plugins looking for the first one that has that attribute, and this is where the issue lay; both fake plugin and fake plugin 2 have a function called fake_func, so its down to the order the plugins are stored in self.plugin.plugins which fake_func is called, and being a dict its unpredictable, therefore without inspecting self.plugin.plugins you can never know with fake_func you are calling. \n\nI have a feeling this might be a more deep rooted problem with the metaplugin, and I do not know how or if who ever designed this planned on dealing with scenarios that have 2 or more plugins with functions of the same name.","commit_id":"e0af8e1dd0cdee90027ec67d3372b927dba8680e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"627d83d62d6726a963402c2a4ddd58a3e9574493","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            self.plugin.get_router(self.context, router_ret1[\u0027id\u0027])"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def test_extension_method(self):"},{"line_number":309,"context_line":"        \"\"\"Test if plugin methods are accessible from self.plugin"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        This test compensates for the nondeterministic ordering of"},{"line_number":312,"context_line":"        self.plugin\u0027s plugins dictionary. Fake Plugin 1 and Fake Plugin 2"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_7df7fe59","line":309,"updated":"2014-11-27 21:30:09.000000000","message":"A much simpler alternative would be to just check that it comes from either since we don\u0027t really care about which one is called.\n\nself.assertIn(self.plugin.fake_func(), [\u0027fake1\u0027, \u0027fake2\u0027])","commit_id":"60d05df39ac34a8e7a0d4282e5d4ccf30c4e731c"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"a2f9e1473933c4f82f8ed54c8a8e7ecf57cfc3ac","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            self.plugin.get_router(self.context, router_ret1[\u0027id\u0027])"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def test_extension_method(self):"},{"line_number":309,"context_line":"        \"\"\"Test if plugin methods are accessible from self.plugin"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        This test compensates for the nondeterministic ordering of"},{"line_number":312,"context_line":"        self.plugin\u0027s plugins dictionary. Fake Plugin 1 and Fake Plugin 2"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_720d2935","line":309,"in_reply_to":"5a890539_7df7fe59","updated":"2015-01-04 05:11:34.000000000","message":"I would be OK with that solution too.\n\nThe metaplugin is scheduled for deprecation so I am not sure how much effort we want to spend on tweaking.","commit_id":"60d05df39ac34a8e7a0d4282e5d4ccf30c4e731c"}]}
