)]}'
{"tempest/api/compute/servers/test_server_metadata.py":[{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"414cc88a57fd04db4a8709a84cdf62e67afbf26c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        meta \u003d {\u0027key1\u0027: \u0027value1\u0027, \u0027key2\u0027: \u0027value2\u0027}"},{"line_number":37,"context_line":"        self.client.set_server_metadata(self.server_id, meta)[\u0027metadata\u0027]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _list_and_assert_metadata(self, expected):"},{"line_number":40,"context_line":"        # All metadata key/value pairs for a server will be returned, which"},{"line_number":41,"context_line":"        # could include metadata added by out of band compute processes,"},{"line_number":42,"context_line":"        # therefore only the test metadata should be validated in the assert"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_9b84a90b","line":39,"updated":"2016-06-13 11:48:23.000000000","message":"You don\u0027t need this.\n\nWhat you want is https://docs.python.org/2.7/library/unittest.html#unittest.TestCase.assertDictContainsSubset\n\nPlease do not introduce a new utility/helper function. Use assertDictContainsSubset directly in tests.","commit_id":"e0e5b1d5bd666a62724f935531232a37c0ebede6"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"f7eb8ecea6993e1dd2bb91a64c1292b51703730b","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        meta \u003d {\u0027key1\u0027: \u0027value1\u0027, \u0027key2\u0027: \u0027value2\u0027}"},{"line_number":37,"context_line":"        self.client.set_server_metadata(self.server_id, meta)[\u0027metadata\u0027]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _list_and_assert_metadata(self, expected):"},{"line_number":40,"context_line":"        # All metadata key/value pairs for a server will be returned, which"},{"line_number":41,"context_line":"        # could include metadata added by out of band compute processes,"},{"line_number":42,"context_line":"        # therefore only the test metadata should be validated in the assert"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_ba405108","line":39,"in_reply_to":"3aaa91ec_36f98e81","updated":"2016-06-24 15:44:23.000000000","message":"So I\u0027m with Jordan on this, we should just use assertDictContainsSubset instead of rolling our own.\n\nTempest uses testtools which uses unittest2 which contains it\u0027s own copy of assertDictContainSubset: \n\nhttps://hg.python.org/unittest2/file/tip/unittest2/case.py#l1130\n\nWe use this assert method elsewhere in tempest:\n\nhttp://codesearch.openstack.org/?q\u003dassertDictContainsSubset\u0026i\u003dnope\u0026files\u003d\u0026repos\u003dtempest\n\nincluding a couple unit tests which work fine on py34 and py35 (I have py35 locally) both of which no longer have it in stdlib.","commit_id":"e0e5b1d5bd666a62724f935531232a37c0ebede6"},{"author":{"_account_id":9152,"name":"Castulo J. Martinez","email":"castulo.martinez@intel.com","username":"cas"},"change_message_id":"42e28a1f74425923e150cdf193a30f58c7fa032e","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        meta \u003d {\u0027key1\u0027: \u0027value1\u0027, \u0027key2\u0027: \u0027value2\u0027}"},{"line_number":37,"context_line":"        self.client.set_server_metadata(self.server_id, meta)[\u0027metadata\u0027]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _list_and_assert_metadata(self, expected):"},{"line_number":40,"context_line":"        # All metadata key/value pairs for a server will be returned, which"},{"line_number":41,"context_line":"        # could include metadata added by out of band compute processes,"},{"line_number":42,"context_line":"        # therefore only the test metadata should be validated in the assert"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_4876c73e","line":39,"in_reply_to":"3aaa91ec_ba405108","updated":"2016-06-24 17:02:24.000000000","message":"I see, it make sense now. I\u0027ll make the changes to use assertDictContainsSubset","commit_id":"e0e5b1d5bd666a62724f935531232a37c0ebede6"},{"author":{"_account_id":9152,"name":"Castulo J. Martinez","email":"castulo.martinez@intel.com","username":"cas"},"change_message_id":"66e92ff57c78c77c1b137e67b28462048ff5ab2c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        meta \u003d {\u0027key1\u0027: \u0027value1\u0027, \u0027key2\u0027: \u0027value2\u0027}"},{"line_number":37,"context_line":"        self.client.set_server_metadata(self.server_id, meta)[\u0027metadata\u0027]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _list_and_assert_metadata(self, expected):"},{"line_number":40,"context_line":"        # All metadata key/value pairs for a server will be returned, which"},{"line_number":41,"context_line":"        # could include metadata added by out of band compute processes,"},{"line_number":42,"context_line":"        # therefore only the test metadata should be validated in the assert"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_c2f3d671","line":39,"in_reply_to":"7aa08908_9b84a90b","updated":"2016-06-13 14:51:14.000000000","message":"I was tempted to use that assertDictContainsSubset but I saw it got deprecated for python 3, so I decided not to use it in case there was plans in the future to move everything to Python 3, but I guess that is not a concern, right?\n\nWhat do you mean about introducing a new utility/helper function? Are you suggesting to get rid of the _list_and_assert_metadata function and repeat that same code in every test?","commit_id":"e0e5b1d5bd666a62724f935531232a37c0ebede6"},{"author":{"_account_id":17716,"name":"Luz Cazares","email":"luz.cazares@intel.com","username":"luzcazares"},"change_message_id":"ed84251487a13415982171bed1ee6aa5cb0ba833","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        meta \u003d {\u0027key1\u0027: \u0027value1\u0027, \u0027key2\u0027: \u0027value2\u0027}"},{"line_number":37,"context_line":"        self.client.set_server_metadata(self.server_id, meta)[\u0027metadata\u0027]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _list_and_assert_metadata(self, expected):"},{"line_number":40,"context_line":"        # All metadata key/value pairs for a server will be returned, which"},{"line_number":41,"context_line":"        # could include metadata added by out of band compute processes,"},{"line_number":42,"context_line":"        # therefore only the test metadata should be validated in the assert"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_36f98e81","line":39,"in_reply_to":"7aa08908_c2f3d671","updated":"2016-06-22 19:24:53.000000000","message":"I agree to avoid using deprecated method.","commit_id":"e0e5b1d5bd666a62724f935531232a37c0ebede6"}]}
