)]}'
{"mistral/api/controllers/v2/resources.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fd417279cdb88d1fc0d678c483a0e15985f185cf","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                   updated_at\u003d\u00271970-01-01T00:00:00.000000\u0027,"},{"line_number":117,"context_line":"                   namespace\u003d\u0027\u0027)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @classmethod"},{"line_number":120,"context_line":"    def _post_hook(cls, obj, wf_spec):"},{"line_number":121,"context_line":"        #  Sets input and interface fields for the Workflow resource."},{"line_number":122,"context_line":"        cls._set_input(obj, wf_spec)"},{"line_number":123,"context_line":"        cls._set_interface(obj, wf_spec)"},{"line_number":124,"context_line":"        return obj"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    @classmethod"},{"line_number":127,"context_line":"    def _set_input(cls, obj, wf_spec):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_26ad76e6","line":124,"range":{"start_line":119,"start_character":4,"end_line":124,"end_character":18},"updated":"2020-01-09 10:44:08.000000000","message":"Can you please explain the purpose of this method? Is it some conventional method from WSME? The body of the method also doesn\u0027t symmetric to me. When I see \"cls._set_interface(...)\" I think that it also includes setting input. But for some reason you do it separately.","commit_id":"f126bb4f2fdb2f2aba41b5234d5f038e781760df"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5f802f92777594924a81c1d97ccbf9bcebe56538","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                   updated_at\u003d\u00271970-01-01T00:00:00.000000\u0027,"},{"line_number":117,"context_line":"                   namespace\u003d\u0027\u0027)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @classmethod"},{"line_number":120,"context_line":"    def _post_hook(cls, obj, wf_spec):"},{"line_number":121,"context_line":"        #  Sets input and interface fields for the Workflow resource."},{"line_number":122,"context_line":"        cls._set_input(obj, wf_spec)"},{"line_number":123,"context_line":"        cls._set_interface(obj, wf_spec)"},{"line_number":124,"context_line":"        return obj"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    @classmethod"},{"line_number":127,"context_line":"    def _set_input(cls, obj, wf_spec):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_86af8a9b","line":124,"range":{"start_line":119,"start_character":4,"end_line":124,"end_character":18},"in_reply_to":"3fa7e38b_06b95a14","updated":"2020-01-09 11:42:11.000000000","message":"Aah, I see. Why \"_post_hook\"? I\u0027m not sure I understand the name.","commit_id":"f126bb4f2fdb2f2aba41b5234d5f038e781760df"},{"author":{"_account_id":30755,"name":"ali","email":"ali.abdelal@nokia.com","username":"abdelal"},"change_message_id":"c9b1102fddb90fc6e24bf3faa101451d9bfcce7f","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                   updated_at\u003d\u00271970-01-01T00:00:00.000000\u0027,"},{"line_number":117,"context_line":"                   namespace\u003d\u0027\u0027)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @classmethod"},{"line_number":120,"context_line":"    def _post_hook(cls, obj, wf_spec):"},{"line_number":121,"context_line":"        #  Sets input and interface fields for the Workflow resource."},{"line_number":122,"context_line":"        cls._set_input(obj, wf_spec)"},{"line_number":123,"context_line":"        cls._set_interface(obj, wf_spec)"},{"line_number":124,"context_line":"        return obj"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    @classmethod"},{"line_number":127,"context_line":"    def _set_input(cls, obj, wf_spec):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_06b95a14","line":124,"range":{"start_line":119,"start_character":4,"end_line":124,"end_character":18},"in_reply_to":"3fa7e38b_26ad76e6","updated":"2020-01-09 10:55:05.000000000","message":"the old method is for the old \u0027input\u0027, the structure of the two is not the same so I left the old method for backward compatibility.\nand since the methods, _set_input, and _set_interface are called at once, it\u0027s better to call one function and if we need in the future to set more fields, we can simply add it in this method, instead of looking everywhere the other methods were called at.","commit_id":"f126bb4f2fdb2f2aba41b5234d5f038e781760df"},{"author":{"_account_id":30755,"name":"ali","email":"ali.abdelal@nokia.com","username":"abdelal"},"change_message_id":"959a03e81975d908ff9463e5cf13e0f7660c43be","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                   updated_at\u003d\u00271970-01-01T00:00:00.000000\u0027,"},{"line_number":117,"context_line":"                   namespace\u003d\u0027\u0027)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @classmethod"},{"line_number":120,"context_line":"    def _post_hook(cls, obj, wf_spec):"},{"line_number":121,"context_line":"        #  Sets input and interface fields for the Workflow resource."},{"line_number":122,"context_line":"        cls._set_input(obj, wf_spec)"},{"line_number":123,"context_line":"        cls._set_interface(obj, wf_spec)"},{"line_number":124,"context_line":"        return obj"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    @classmethod"},{"line_number":127,"context_line":"    def _set_input(cls, obj, wf_spec):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_89ec7d28","line":124,"range":{"start_line":119,"start_character":4,"end_line":124,"end_character":18},"in_reply_to":"3fa7e38b_86af8a9b","updated":"2020-01-09 11:49:53.000000000","message":"this is called after everything else, and it does not do one specific thing.","commit_id":"f126bb4f2fdb2f2aba41b5234d5f038e781760df"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"ce5a1b27ef77646e205f878c6c7b98f667b6fa66","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        for param in wf_spec_output:"},{"line_number":163,"context_line":"            if isinstance(param, dict):"},{"line_number":164,"context_line":"                for k, v in param.items():"},{"line_number":165,"context_line":"                    print(k, v)"},{"line_number":166,"context_line":"                    output_list.append(\"%s\" % k)"},{"line_number":167,"context_line":"            else:"},{"line_number":168,"context_line":"                output_list.append(param)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_232328bd","line":165,"range":{"start_line":165,"start_character":19,"end_line":165,"end_character":31},"updated":"2020-01-09 10:36:43.000000000","message":"??","commit_id":"f126bb4f2fdb2f2aba41b5234d5f038e781760df"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"dc57ca9465a7669ae26b88c98b142f7c7a22c9ef","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        cls._set_interface(obj, wf_spec)"},{"line_number":124,"context_line":"        return obj"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    @classmethod"},{"line_number":127,"context_line":"    def _set_input(cls, obj, wf_spec):"},{"line_number":128,"context_line":"        input_list \u003d []"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_463e72b9","line":126,"range":{"start_line":126,"start_character":5,"end_line":126,"end_character":16},"updated":"2020-01-09 10:42:49.000000000","message":"I think you can use staticmethod here","commit_id":"9bd99ab02a7e6fed577eec381ae080ff1d80639e"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"dc57ca9465a7669ae26b88c98b142f7c7a22c9ef","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        return obj"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @classmethod"},{"line_number":145,"context_line":"    def _set_interface(cls, obj, wf_spec):"},{"line_number":146,"context_line":"        interface_list \u003d {}"},{"line_number":147,"context_line":"        if wf_spec:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_c67342b3","line":144,"range":{"start_line":144,"start_character":5,"end_line":144,"end_character":16},"updated":"2020-01-09 10:42:49.000000000","message":"same as above","commit_id":"9bd99ab02a7e6fed577eec381ae080ff1d80639e"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"dc57ca9465a7669ae26b88c98b142f7c7a22c9ef","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        return obj"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    @classmethod"},{"line_number":160,"context_line":"    def _create_output_list(cls, wf_spec_output):"},{"line_number":161,"context_line":"        output_list \u003d []"},{"line_number":162,"context_line":"        for param in wf_spec_output:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_e6767ea3","line":159,"range":{"start_line":159,"start_character":5,"end_line":159,"end_character":16},"updated":"2020-01-09 10:42:49.000000000","message":"same as above","commit_id":"9bd99ab02a7e6fed577eec381ae080ff1d80639e"},{"author":{"_account_id":9029,"name":"Moshe Elisha","email":"moshe.elisha@nokia.com","username":"MosheElisha"},"change_message_id":"13d0bde6abbfd0d0a0dc44ac1b9d435e181b72a0","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def _create_output_list(cls, wf_spec_output):"},{"line_number":161,"context_line":"        output_list \u003d []"},{"line_number":162,"context_line":"        for param in wf_spec_output:"},{"line_number":163,"context_line":"            if isinstance(param, dict):"},{"line_number":164,"context_line":"                for k, v in param.items():"},{"line_number":165,"context_line":"                    output_list.append(\"%s\" % k)"},{"line_number":166,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_c62582af","line":163,"updated":"2020-01-09 10:40:30.000000000","message":"Please make sure the test covers both \"if\" and \"else\" use cases","commit_id":"9bd99ab02a7e6fed577eec381ae080ff1d80639e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7bd4b5947b2aa941fb5f001354d33d3dcaafabe7","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                   updated_at\u003d\u00271970-01-01T00:00:00.000000\u0027,"},{"line_number":118,"context_line":"                   namespace\u003d\u0027\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @staticmethod"},{"line_number":121,"context_line":"    def _set_attributes(obj, wf_spec):"},{"line_number":122,"context_line":"        #  Sets input and interface fields for the Workflow resource."},{"line_number":123,"context_line":"        Workflow._set_input(obj, wf_spec)"},{"line_number":124,"context_line":"        Workflow._set_interface(obj, wf_spec)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_fb11d351","line":121,"range":{"start_line":120,"start_character":4,"end_line":121,"end_character":38},"updated":"2020-01-16 07:05:44.000000000","message":"Let\u0027s make it a bit more beautiful:\n\n1. These methods _set_attributes, _set_input, _set_interface can instance methods (i.e. taking self parameter) because they\u0027re always called when an instance is already created. Having them static is confusing.\n2. I\u0027d suggest we rename the method _set_attributes to something like _set_attributes_from_spec\n\nThe rest looks good to me.","commit_id":"d05f5cb5f9713a192575b12d894d7e1e8a1ee541"},{"author":{"_account_id":30755,"name":"ali","email":"ali.abdelal@nokia.com","username":"abdelal"},"change_message_id":"cdf64402b769a471798bb5c20251c841b2963b42","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                   updated_at\u003d\u00271970-01-01T00:00:00.000000\u0027,"},{"line_number":118,"context_line":"                   namespace\u003d\u0027\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @staticmethod"},{"line_number":121,"context_line":"    def _set_attributes(obj, wf_spec):"},{"line_number":122,"context_line":"        #  Sets input and interface fields for the Workflow resource."},{"line_number":123,"context_line":"        Workflow._set_input(obj, wf_spec)"},{"line_number":124,"context_line":"        Workflow._set_interface(obj, wf_spec)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_01bb20be","line":121,"range":{"start_line":120,"start_character":4,"end_line":121,"end_character":38},"in_reply_to":"3fa7e38b_fb11d351","updated":"2020-01-16 10:39:55.000000000","message":"for 1, I am not sure, this function is called only from a from_db_model, from_dict,from_tuples, these are class methods, so there can be no instance sometimes.","commit_id":"d05f5cb5f9713a192575b12d894d7e1e8a1ee541"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"1363c342fe03caf3698b82d81bf8dd7d08cb306a","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                   updated_at\u003d\u00271970-01-01T00:00:00.000000\u0027,"},{"line_number":118,"context_line":"                   namespace\u003d\u0027\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @staticmethod"},{"line_number":121,"context_line":"    def _set_attributes(obj, wf_spec):"},{"line_number":122,"context_line":"        #  Sets input and interface fields for the Workflow resource."},{"line_number":123,"context_line":"        Workflow._set_input(obj, wf_spec)"},{"line_number":124,"context_line":"        Workflow._set_interface(obj, wf_spec)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_fbdb1377","line":121,"range":{"start_line":120,"start_character":4,"end_line":121,"end_character":38},"in_reply_to":"3fa7e38b_fb11d351","updated":"2020-01-16 07:16:06.000000000","message":"maybe make it @property ?","commit_id":"d05f5cb5f9713a192575b12d894d7e1e8a1ee541"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6cf0e0e6fe7eb774c099d6a476cb30c26df44069","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                   updated_at\u003d\u00271970-01-01T00:00:00.000000\u0027,"},{"line_number":118,"context_line":"                   namespace\u003d\u0027\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @staticmethod"},{"line_number":121,"context_line":"    def _set_attributes(obj, wf_spec):"},{"line_number":122,"context_line":"        #  Sets input and interface fields for the Workflow resource."},{"line_number":123,"context_line":"        Workflow._set_input(obj, wf_spec)"},{"line_number":124,"context_line":"        Workflow._set_interface(obj, wf_spec)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_1b506f5f","line":121,"range":{"start_line":120,"start_character":4,"end_line":121,"end_character":38},"in_reply_to":"3fa7e38b_fbdb1377","updated":"2020-01-16 08:13:19.000000000","message":"Well, in my understanding @property usually applies to something simple that doesn\u0027t require a complex logic to obtain a value. But I\u0027m not sure on 100%, that would probably work too.","commit_id":"d05f5cb5f9713a192575b12d894d7e1e8a1ee541"}],"mistral/tests/unit/api/test_resource_base.py":[{"author":{"_account_id":9029,"name":"Moshe Elisha","email":"moshe.elisha@nokia.com","username":"MosheElisha"},"change_message_id":"0a88c229d7a96808f520d23d15c85045673d855f","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            Creates VM and waits till VM OS is up and running."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"          input:"},{"line_number":53,"context_line":"            - string_param: \"string\""},{"line_number":54,"context_line":"            - json_param: {"},{"line_number":55,"context_line":"                string_param: \"string\""},{"line_number":56,"context_line":"               }"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_430bc429","line":53,"updated":"2020-01-09 10:38:09.000000000","message":"Please add an input that has no default value","commit_id":"f126bb4f2fdb2f2aba41b5234d5f038e781760df"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fd417279cdb88d1fc0d678c483a0e15985f185cf","unresolved":false,"context_lines":[{"line_number":41,"context_line":"}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"WF \u003d \"\"\"---"},{"line_number":44,"context_line":"        version: \u00272.0\u0027"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        std.create_instance:"},{"line_number":47,"context_line":"          type: direct"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"          description: |"},{"line_number":50,"context_line":"            Creates VM and waits till VM OS is up and running."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"          input:"},{"line_number":53,"context_line":"            - string_param: \"string\""},{"line_number":54,"context_line":"            - json_param: {"},{"line_number":55,"context_line":"                string_param: \"string\""},{"line_number":56,"context_line":"               }"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"          output:"},{"line_number":59,"context_line":"            output1: \u0027output\u0027"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"          tasks:"},{"line_number":62,"context_line":"            task1:"},{"line_number":63,"context_line":"              action: std.noop"},{"line_number":64,"context_line":"        \"\"\""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class TestRestResource(base.DbTestCase):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_861b0a6d","line":64,"range":{"start_line":44,"start_character":0,"end_line":64,"end_character":11},"updated":"2020-01-09 10:44:08.000000000","message":"Usually we don\u0027t use any indents in such cases. For example, take a look at test_policies.py. It\u0027s not a critical thing but we need to try to follow one style.","commit_id":"f126bb4f2fdb2f2aba41b5234d5f038e781760df"},{"author":{"_account_id":9029,"name":"Moshe Elisha","email":"moshe.elisha@nokia.com","username":"MosheElisha"},"change_message_id":"0a88c229d7a96808f520d23d15c85045673d855f","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        \"\"\""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class TestRestResource(base.DbTestCase):"},{"line_number":68,"context_line":"    def test_from_db_model(self):"},{"line_number":69,"context_line":"        wf_ex \u003d db_api.create_workflow_execution(WF_EXEC)"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_23fc880b","line":67,"updated":"2020-01-09 10:38:09.000000000","message":"Please add a test for interface result for WF without any inputs or outputs","commit_id":"f126bb4f2fdb2f2aba41b5234d5f038e781760df"}],"mistral/tests/unit/api/v2/test_workflows.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7bd4b5947b2aa941fb5f001354d33d3dcaafabe7","unresolved":false,"context_lines":[{"line_number":517,"context_line":""},{"line_number":518,"context_line":"    @mock.patch.object(db_api, \"create_workflow_definition\")"},{"line_number":519,"context_line":"    def test_post_multiple(self, mock_mtd):"},{"line_number":520,"context_line":"        mock_mtd().spec \u003d {}"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"        self.app.post("},{"line_number":523,"context_line":"            \u0027/v2/workflows\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_3b31abef","line":520,"range":{"start_line":520,"start_character":8,"end_line":520,"end_character":28},"updated":"2020-01-16 07:05:44.000000000","message":"I\u0027m not sure what\u0027s going on here. What\u0027s it for? The parameter is a method object. Why do you call it before making a HTTP request?","commit_id":"d05f5cb5f9713a192575b12d894d7e1e8a1ee541"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"33927ecf9f0cea4ae734b6b5ba6a53ee339f822b","unresolved":false,"context_lines":[{"line_number":517,"context_line":""},{"line_number":518,"context_line":"    @mock.patch.object(db_api, \"create_workflow_definition\")"},{"line_number":519,"context_line":"    def test_post_multiple(self, mock_mtd):"},{"line_number":520,"context_line":"        mock_mtd().spec \u003d {}"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"        self.app.post("},{"line_number":523,"context_line":"            \u0027/v2/workflows\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_61a534b4","line":520,"range":{"start_line":520,"start_character":8,"end_line":520,"end_character":28},"in_reply_to":"3fa7e38b_21cadc6e","updated":"2020-01-16 10:25:51.000000000","message":"Ok. I\u0027m just wondering if it\u0027s a feature of the \"mock\" library or just a lucky coincidence :)","commit_id":"d05f5cb5f9713a192575b12d894d7e1e8a1ee541"},{"author":{"_account_id":30755,"name":"ali","email":"ali.abdelal@nokia.com","username":"abdelal"},"change_message_id":"8338e9473441697fe93294fc3a8a4d9ad1bc1928","unresolved":false,"context_lines":[{"line_number":517,"context_line":""},{"line_number":518,"context_line":"    @mock.patch.object(db_api, \"create_workflow_definition\")"},{"line_number":519,"context_line":"    def test_post_multiple(self, mock_mtd):"},{"line_number":520,"context_line":"        mock_mtd().spec \u003d {}"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"        self.app.post("},{"line_number":523,"context_line":"            \u0027/v2/workflows\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_bbed9b8e","line":520,"range":{"start_line":520,"start_character":8,"end_line":520,"end_character":28},"in_reply_to":"3fa7e38b_3b31abef","updated":"2020-01-16 08:16:18.000000000","message":"when the function getspec() is called without this line, what is returned is something like this\n\u003cMagicMock name\u003d\u0027create_workflow_definition().spec.get()\u0027 id\u003d\u0027139844529834752\u0027\u003e, and its added to the list of inputs.\nwhich does not happen in runtime","commit_id":"d05f5cb5f9713a192575b12d894d7e1e8a1ee541"},{"author":{"_account_id":30755,"name":"ali","email":"ali.abdelal@nokia.com","username":"abdelal"},"change_message_id":"ba0f2d9a3efb23b8f5458567eadb7a0ee79942b3","unresolved":false,"context_lines":[{"line_number":517,"context_line":""},{"line_number":518,"context_line":"    @mock.patch.object(db_api, \"create_workflow_definition\")"},{"line_number":519,"context_line":"    def test_post_multiple(self, mock_mtd):"},{"line_number":520,"context_line":"        mock_mtd().spec \u003d {}"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"        self.app.post("},{"line_number":523,"context_line":"            \u0027/v2/workflows\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_21cadc6e","line":520,"range":{"start_line":520,"start_character":8,"end_line":520,"end_character":28},"in_reply_to":"3fa7e38b_811f1059","updated":"2020-01-16 10:23:37.000000000","message":"yes, when the spec.get() is called, it returns the object I assigned here.","commit_id":"d05f5cb5f9713a192575b12d894d7e1e8a1ee541"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"728551b91f2cf65056ad33adbe1feefd8ae26573","unresolved":false,"context_lines":[{"line_number":517,"context_line":""},{"line_number":518,"context_line":"    @mock.patch.object(db_api, \"create_workflow_definition\")"},{"line_number":519,"context_line":"    def test_post_multiple(self, mock_mtd):"},{"line_number":520,"context_line":"        mock_mtd().spec \u003d {}"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"        self.app.post("},{"line_number":523,"context_line":"            \u0027/v2/workflows\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_811f1059","line":520,"range":{"start_line":520,"start_character":8,"end_line":520,"end_character":28},"in_reply_to":"3fa7e38b_bbed9b8e","updated":"2020-01-16 09:51:56.000000000","message":"So, just to make sure I understand..\n\nYou call a method with \"mock_mtd()\", it returns some kind of mock object. And then you assign {} to this mock object\u0027s \"spec\" property. When the controller calls this mock method again it, does it return the same mock object as a result? For which you already specified the \"spec\" property.","commit_id":"d05f5cb5f9713a192575b12d894d7e1e8a1ee541"}]}
