)]}'
{"storlets/tools/deploy_storlet.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"3535914fb441c848521f46f00d409334ccd3751f","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    storlet_language \u003d sys.stdin.readline().rstrip().title()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    if storlet_language not in MESSAGES:"},{"line_number":103,"context_line":"        print(\"The language you specified is not in support\")"},{"line_number":104,"context_line":"        return 1"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    message_iter \u003d MESSAGES[storlet_language]"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba2be162_380515c2","line":103,"updated":"2017-03-01 07:21:54.000000000","message":"How about: \"The specified language is not supported\"?","commit_id":"ee36700c0cbe9ad8f3fe13f713ac58dba07b5581"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"21dccd6fbaa8cf69aca09da8d88653fa0e4f6832","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    storlet_language \u003d sys.stdin.readline().rstrip().title()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    if storlet_language not in MESSAGES:"},{"line_number":103,"context_line":"        print(\"The language you specified is not in support\")"},{"line_number":104,"context_line":"        return 1"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    message_iter \u003d MESSAGES[storlet_language]"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba2be162_3dbbfc0f","line":103,"in_reply_to":"ba2be162_380515c2","updated":"2017-03-02 12:24:05.000000000","message":"Seems good, thanks.\n\nEr, I found we don\u0027t have the negative test here. Once I changed the message here, no tests failed :/\n\nWe should add that in followup.","commit_id":"ee36700c0cbe9ad8f3fe13f713ac58dba07b5581"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"3535914fb441c848521f46f00d409334ccd3751f","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    message_iter \u003d MESSAGES[storlet_language]"},{"line_number":107,"context_line":"    options_dict \u003d dict(language\u003dstorlet_language)"},{"line_number":108,"context_line":"    for message, reader in message_iter:"},{"line_number":109,"context_line":"        print(message)"},{"line_number":110,"context_line":"        options_dict[reader.key] \u003d reader()"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba2be162_38d3553a","line":108,"updated":"2017-03-01 07:21:54.000000000","message":"Nice!","commit_id":"ee36700c0cbe9ad8f3fe13f713ac58dba07b5581"}],"tests/functional/common/mixins.py":[{"author":{"_account_id":17901,"name":"Akihito Takai","email":"takaiak@nttdata.co.jp","username":"AkihitoTakai"},"change_message_id":"e4cf75f20db93ae0f067655c2ed1ac651d62afff","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        conf \u003d ClusterConfig(self.conf_file)"},{"line_number":53,"context_line":"        url, token \u003d get_auth(conf, conf.admin_user, conf.admin_password)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        # for storlet app"},{"line_number":56,"context_line":"        storlet_file \u003d os.path.basename(self.execdep_storlet_file)"},{"line_number":57,"context_line":"        resp_headers \u003d swiftclient.client.head_object("},{"line_number":58,"context_line":"            url, token, \u0027storlet\u0027, storlet_file)"},{"line_number":59,"context_line":"        hasher \u003d hashlib.md5()"},{"line_number":60,"context_line":"        with open(self.execdep_storlet_file) as f:"},{"line_number":61,"context_line":"            hasher.update(f.read())"},{"line_number":62,"context_line":"        self.assertEqual(resp_headers[\u0027etag\u0027], hasher.hexdigest())"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # for dependency"},{"line_number":65,"context_line":"        dep_file \u003d os.path.basename(self.execdep_storlet_dep_file)"},{"line_number":66,"context_line":"        resp_headers \u003d swiftclient.client.head_object("},{"line_number":67,"context_line":"            url, token, \u0027dependency\u0027, dep_file)"},{"line_number":68,"context_line":"        hasher \u003d hashlib.md5()"},{"line_number":69,"context_line":"        with open(self.execdep_storlet_dep_file) as f:"},{"line_number":70,"context_line":"            hasher.update(f.read())"},{"line_number":71,"context_line":"        self.assertEqual(resp_headers[\u0027etag\u0027], hasher.hexdigest())"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba2be162_96b5adef","line":71,"range":{"start_line":55,"start_character":0,"end_line":71,"end_character":66},"updated":"2017-03-02 11:09:38.000000000","message":"How about this code put together in a method?\nBecause L55-L62 and L64-L71 are similar.","commit_id":"ee36700c0cbe9ad8f3fe13f713ac58dba07b5581"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"21dccd6fbaa8cf69aca09da8d88653fa0e4f6832","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        conf \u003d ClusterConfig(self.conf_file)"},{"line_number":53,"context_line":"        url, token \u003d get_auth(conf, conf.admin_user, conf.admin_password)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        # for storlet app"},{"line_number":56,"context_line":"        storlet_file \u003d os.path.basename(self.execdep_storlet_file)"},{"line_number":57,"context_line":"        resp_headers \u003d swiftclient.client.head_object("},{"line_number":58,"context_line":"            url, token, \u0027storlet\u0027, storlet_file)"},{"line_number":59,"context_line":"        hasher \u003d hashlib.md5()"},{"line_number":60,"context_line":"        with open(self.execdep_storlet_file) as f:"},{"line_number":61,"context_line":"            hasher.update(f.read())"},{"line_number":62,"context_line":"        self.assertEqual(resp_headers[\u0027etag\u0027], hasher.hexdigest())"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # for dependency"},{"line_number":65,"context_line":"        dep_file \u003d os.path.basename(self.execdep_storlet_dep_file)"},{"line_number":66,"context_line":"        resp_headers \u003d swiftclient.client.head_object("},{"line_number":67,"context_line":"            url, token, \u0027dependency\u0027, dep_file)"},{"line_number":68,"context_line":"        hasher \u003d hashlib.md5()"},{"line_number":69,"context_line":"        with open(self.execdep_storlet_dep_file) as f:"},{"line_number":70,"context_line":"            hasher.update(f.read())"},{"line_number":71,"context_line":"        self.assertEqual(resp_headers[\u0027etag\u0027], hasher.hexdigest())"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba2be162_385f8a0f","line":71,"range":{"start_line":55,"start_character":0,"end_line":71,"end_character":66},"in_reply_to":"ba2be162_96b5adef","updated":"2017-03-02 12:24:05.000000000","message":"Good call, thanks. Will do!","commit_id":"ee36700c0cbe9ad8f3fe13f713ac58dba07b5581"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"d4160aed1966245c2a6ae59d5cfadbc97e680db3","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            self.fail("},{"line_number":62,"context_line":"                \u0027Expected message \"%s\" not found: %s\u0027 % (message, err))"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Make sure the existence in the swift inside"},{"line_number":65,"context_line":"        conf \u003d ClusterConfig(self.conf_file)"},{"line_number":66,"context_line":"        url, token \u003d get_auth(conf, conf.admin_user, conf.admin_password)"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ba2be162_45abddd6","line":64,"updated":"2017-03-06 19:19:37.000000000","message":"Seems like L64-65 are redundant now, as they appear in L30-31","commit_id":"da6791ff82f524bfa4f5a8d7b07e102431096d79"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"cdbb9ad97be17edfe40ed87140831f66f26a0def","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            self.fail("},{"line_number":62,"context_line":"                \u0027Expected message \"%s\" not found: %s\u0027 % (message, err))"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Make sure the existence in the swift inside"},{"line_number":65,"context_line":"        conf \u003d ClusterConfig(self.conf_file)"},{"line_number":66,"context_line":"        url, token \u003d get_auth(conf, conf.admin_user, conf.admin_password)"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9a30ddce_62136e5d","line":64,"in_reply_to":"ba2be162_45abddd6","updated":"2017-03-07 08:47:29.000000000","message":"Done","commit_id":"da6791ff82f524bfa4f5a8d7b07e102431096d79"}],"tests/unit/tools/test_deploy_storlet.py":[{"author":{"_account_id":17901,"name":"Akihito Takai","email":"takaiak@nttdata.co.jp","username":"AkihitoTakai"},"change_message_id":"e4cf75f20db93ae0f067655c2ed1ac651d62afff","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self._test_deploy_storlet_main(\u0027python\u0027)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _test_deploy_storlet_main(self, lang):"},{"line_number":47,"context_line":"        # TODO(kota_): avoid mock for ClusterConfig and get_auth"},{"line_number":48,"context_line":"        get_auth_func_path \u003d \u0027storlets.tools.deploy_storlet.get_auth\u0027"},{"line_number":49,"context_line":"        deploy_storlet_path \u003d \u0027storlets.tools.deploy_storlet.deploy_storlet\u0027"},{"line_number":50,"context_line":"        with mock.patch(\u0027storlets.tools.deploy_storlet.ClusterConfig\u0027), \\"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba2be162_d3a497a7","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":64},"updated":"2017-03-02 11:09:38.000000000","message":"I have a simple question.\nWhy do you need to avoid the mock?","commit_id":"ee36700c0cbe9ad8f3fe13f713ac58dba07b5581"},{"author":{"_account_id":17901,"name":"Akihito Takai","email":"takaiak@nttdata.co.jp","username":"AkihitoTakai"},"change_message_id":"2bfd0a9d203298ec611c26d64ef6e9b0e67f86e8","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self._test_deploy_storlet_main(\u0027python\u0027)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _test_deploy_storlet_main(self, lang):"},{"line_number":47,"context_line":"        # TODO(kota_): avoid mock for ClusterConfig and get_auth"},{"line_number":48,"context_line":"        get_auth_func_path \u003d \u0027storlets.tools.deploy_storlet.get_auth\u0027"},{"line_number":49,"context_line":"        deploy_storlet_path \u003d \u0027storlets.tools.deploy_storlet.deploy_storlet\u0027"},{"line_number":50,"context_line":"        with mock.patch(\u0027storlets.tools.deploy_storlet.ClusterConfig\u0027), \\"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba2be162_cb762505","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":64},"in_reply_to":"ba2be162_b8b8dae6","updated":"2017-03-06 04:14:25.000000000","message":"Thank you!\nI understood it.","commit_id":"ee36700c0cbe9ad8f3fe13f713ac58dba07b5581"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"21dccd6fbaa8cf69aca09da8d88653fa0e4f6832","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self._test_deploy_storlet_main(\u0027python\u0027)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _test_deploy_storlet_main(self, lang):"},{"line_number":47,"context_line":"        # TODO(kota_): avoid mock for ClusterConfig and get_auth"},{"line_number":48,"context_line":"        get_auth_func_path \u003d \u0027storlets.tools.deploy_storlet.get_auth\u0027"},{"line_number":49,"context_line":"        deploy_storlet_path \u003d \u0027storlets.tools.deploy_storlet.deploy_storlet\u0027"},{"line_number":50,"context_line":"        with mock.patch(\u0027storlets.tools.deploy_storlet.ClusterConfig\u0027), \\"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba2be162_b8b8dae6","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":64},"in_reply_to":"ba2be162_d3a497a7","updated":"2017-03-02 12:24:05.000000000","message":"To say correctly, I\u0027d like to divide the interactive part from the main to be a function called like \"interact_deploy_info\". With the change, we won\u0027t need to mock the ClusterConfig and get_auth and able to test the \"interact_deploy_info\" method directly, then we can avoid redundant mock code here simply ;-)","commit_id":"ee36700c0cbe9ad8f3fe13f713ac58dba07b5581"},{"author":{"_account_id":17901,"name":"Akihito Takai","email":"takaiak@nttdata.co.jp","username":"AkihitoTakai"},"change_message_id":"2bfd0a9d203298ec611c26d64ef6e9b0e67f86e8","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                    return stdins.pop(0)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"            with mock.patch(\u0027sys.stdin\u0027, MockStdin()):"},{"line_number":64,"context_line":"                main([\u0027dammy_config_path\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # sanity"},{"line_number":67,"context_line":"        self.assertEqual(1, mock_deploy_storlet.call_count)"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba2be162_0b63dd42","line":64,"range":{"start_line":64,"start_character":23,"end_line":64,"end_character":28},"updated":"2017-03-06 04:14:25.000000000","message":"(nit) typo.\ndammy --\u003e dummy","commit_id":"ee36700c0cbe9ad8f3fe13f713ac58dba07b5581"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"3d2fed23586da2a2f53a38c2aafba0726dc23118","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                    return stdins.pop(0)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"            with mock.patch(\u0027sys.stdin\u0027, MockStdin()):"},{"line_number":64,"context_line":"                main([\u0027dammy_config_path\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # sanity"},{"line_number":67,"context_line":"        self.assertEqual(1, mock_deploy_storlet.call_count)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a30ddce_2220969b","line":64,"range":{"start_line":64,"start_character":23,"end_line":64,"end_character":28},"in_reply_to":"ba2be162_0b63dd42","updated":"2017-03-07 08:47:21.000000000","message":"Done","commit_id":"ee36700c0cbe9ad8f3fe13f713ac58dba07b5581"}]}
