)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"7ae85ba19327b6c6a2a131ee8a8822fc853f343b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"- Pulling protocol, ports from the request body."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ic1440f735b6cf2b8b4f29c5ab9f48bcb427ca9e6"},{"line_number":16,"context_line":"Closes-Bug: #1298749"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAWH%2F91WI%3D","line":16,"updated":"2014-04-01 19:32:02.000000000","message":"Fix create call for the security group rules\n\nReasons:\n - create call expects extra unused attributes like protocol,\n   from/to ports, that are being ignored by the Trove in favor\n   of the datastore-specific ports(mentioned in config file) values;\n - create call requires only security group id and valid CIDR.\n\nChanges:\n - using datastore-specific ports for building \n   new rules, based upon income CIDR;","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"}],"trove/extensions/security_group/models.py":[{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"9552bd34f53782dd5a98e1474547a1d36ab7fbfa","unresolved":false,"context_lines":[{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"cidr_regex \u003d (\"^(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.\""},{"line_number":37,"context_line":"              \"(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.\""},{"line_number":38,"context_line":"              \"(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.\""},{"line_number":39,"context_line":"              \"(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F90f8%3D","line":36,"updated":"2014-04-01 22:10:27.000000000","message":"additional cidr validation is outside of the scope of this fix; this patch\u0027s purpose is to remove the requirement of fields that aren\u0027t utilized any longer.","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":5293,"name":"Nikhil","email":"SlickNik@gmail.com","username":"slicknik"},"change_message_id":"b7c7457ec26afbc05fa9340aa25718b9d62f5ffe","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    match \u003d re.match(cidr_regex, cidr)"},{"line_number":45,"context_line":"    return True if match else False"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def persisted_models():"},{"line_number":49,"context_line":"    return {"},{"line_number":50,"context_line":"        \u0027security_group\u0027: SecurityGroup,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F90f0%3D","line":47,"updated":"2014-04-01 22:08:33.000000000","message":"Can we remove the CIDR validation and add it as part of a different bugfix? This seems tangential to solving the current issue. Thanks!","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"}],"trove/extensions/security_group/service.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"6dea0acebf60cfb63a2b7b83d5c8f849ecc87907","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        sec_group_rule \u003d models.SecurityGroupRule.create_sec_group_rule("},{"line_number":89,"context_line":"            sec_group,"},{"line_number":90,"context_line":"            body[\u0027security_group_rule\u0027][\u0027protocol\u0027],"},{"line_number":91,"context_line":"            body[\u0027security_group_rule\u0027][\u0027from_port\u0027],"},{"line_number":92,"context_line":"            body[\u0027security_group_rule\u0027][\u0027to_port\u0027],"},{"line_number":93,"context_line":"            body[\u0027security_group_rule\u0027][\u0027cidr\u0027],"},{"line_number":94,"context_line":"            context)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BJOg%3D","line":91,"updated":"2014-03-28 20:13:48.000000000","message":"As discussed:\nI\u0027d call that a bug in the client; we should probably fix the client to not allow those options.","commit_id":"4711f22dc6d8436ec6b5aa973657901ad930e25c"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"5a4ff0525943fe97058f387d29a611ed618a6cc2","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        udp_ports \u003d CONF.get(manager).udp_ports"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        def _gen_ports(portstr):"},{"line_number":98,"context_line":"            from_port, sep, to_port \u003d portstr.partition(\u0027-\u0027)"},{"line_number":99,"context_line":"            if not (to_port and from_port):"},{"line_number":100,"context_line":"                if not sep:"},{"line_number":101,"context_line":"                    to_port \u003d from_port"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F90mg%3D","line":98,"updated":"2014-04-01 21:54:18.000000000","message":"This code is similar to that found in trove/taskmanager/models.py. Why not put it some place it can be called instead of copy-and-pasted?","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"795e7b7c15ba6b2559ddb4959a5ec9ae3d20742f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                    to_port \u003d from_port"},{"line_number":102,"context_line":"            try:"},{"line_number":103,"context_line":"                if int(from_port) \u003e int(to_port):"},{"line_number":104,"context_line":"                    raise"},{"line_number":105,"context_line":"            except ValueError:"},{"line_number":106,"context_line":"                raise"},{"line_number":107,"context_line":"            return from_port, to_port"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F91J4%3D","line":104,"updated":"2014-04-01 20:21:29.000000000","message":"I think this is a syntax error.","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"9552bd34f53782dd5a98e1474547a1d36ab7fbfa","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                    to_port \u003d from_port"},{"line_number":102,"context_line":"            try:"},{"line_number":103,"context_line":"                if int(from_port) \u003e int(to_port):"},{"line_number":104,"context_line":"                    raise"},{"line_number":105,"context_line":"            except ValueError:"},{"line_number":106,"context_line":"                raise"},{"line_number":107,"context_line":"            return from_port, to_port"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F90fs%3D","line":104,"in_reply_to":"AAAAWH%2F90mo%3D","updated":"2014-04-01 22:10:27.000000000","message":"agreed with mlowery.","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"5a4ff0525943fe97058f387d29a611ed618a6cc2","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                    to_port \u003d from_port"},{"line_number":102,"context_line":"            try:"},{"line_number":103,"context_line":"                if int(from_port) \u003e int(to_port):"},{"line_number":104,"context_line":"                    raise"},{"line_number":105,"context_line":"            except ValueError:"},{"line_number":106,"context_line":"                raise"},{"line_number":107,"context_line":"            return from_port, to_port"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F90mo%3D","line":104,"in_reply_to":"AAAAWH%2F91Fo%3D","updated":"2014-04-01 21:54:18.000000000","message":"I don\u0027t think you can re-raise outside of except block. Stated differently, what are you raising here?","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3f17330349b27e05b9426709857ae3eb91535b61","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                    to_port \u003d from_port"},{"line_number":102,"context_line":"            try:"},{"line_number":103,"context_line":"                if int(from_port) \u003e int(to_port):"},{"line_number":104,"context_line":"                    raise"},{"line_number":105,"context_line":"            except ValueError:"},{"line_number":106,"context_line":"                raise"},{"line_number":107,"context_line":"            return from_port, to_port"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F91Fo%3D","line":104,"in_reply_to":"AAAAWH%2F91J4%3D","updated":"2014-04-01 20:32:20.000000000","message":"where ?","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"795e7b7c15ba6b2559ddb4959a5ec9ae3d20742f","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            cidr \u003d body[\u0027security_group_rule\u0027][\u0027cidr\u0027]"},{"line_number":137,"context_line":"            if not models.is_cidr_valid(cidr):"},{"line_number":138,"context_line":"                LOG.error(_(\"Invalid cidr: %s\") % cidr)"},{"line_number":139,"context_line":"                raise Exception"},{"line_number":140,"context_line":"        except Exception as e:"},{"line_number":141,"context_line":"            LOG.error(_(\"Create Security Group Rules Required field(s) \""},{"line_number":142,"context_line":"                        \"- %s\") % e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F91Jk%3D","line":139,"updated":"2014-04-01 20:21:29.000000000","message":"No exception message?","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"9552bd34f53782dd5a98e1474547a1d36ab7fbfa","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            cidr \u003d body[\u0027security_group_rule\u0027][\u0027cidr\u0027]"},{"line_number":137,"context_line":"            if not models.is_cidr_valid(cidr):"},{"line_number":138,"context_line":"                LOG.error(_(\"Invalid cidr: %s\") % cidr)"},{"line_number":139,"context_line":"                raise Exception"},{"line_number":140,"context_line":"        except Exception as e:"},{"line_number":141,"context_line":"            LOG.error(_(\"Create Security Group Rules Required field(s) \""},{"line_number":142,"context_line":"                        \"- %s\") % e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F90fg%3D","line":139,"in_reply_to":"AAAAWH%2F91C4%3D","updated":"2014-04-01 22:10:27.000000000","message":"agreed with mlowery.","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3f17330349b27e05b9426709857ae3eb91535b61","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            cidr \u003d body[\u0027security_group_rule\u0027][\u0027cidr\u0027]"},{"line_number":137,"context_line":"            if not models.is_cidr_valid(cidr):"},{"line_number":138,"context_line":"                LOG.error(_(\"Invalid cidr: %s\") % cidr)"},{"line_number":139,"context_line":"                raise Exception"},{"line_number":140,"context_line":"        except Exception as e:"},{"line_number":141,"context_line":"            LOG.error(_(\"Create Security Group Rules Required field(s) \""},{"line_number":142,"context_line":"                        \"- %s\") % e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F91C4%3D","line":139,"in_reply_to":"AAAAWH%2F91Jk%3D","updated":"2014-04-01 20:32:20.000000000","message":"agreed, i\u0027ll add exception message","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"}],"trove/extensions/security_group/views.py":[{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"795e7b7c15ba6b2559ddb4959a5ec9ae3d20742f","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            views.append(to_append)"},{"line_number":124,"context_line":"        return {resp_key: views}"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def data(self):"},{"line_number":127,"context_line":"        return self._build_create()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F91JA%3D","line":126,"updated":"2014-04-01 20:21:29.000000000","message":"It\u0027s not clear to me the difference between data and create methods. (You renamed this to data but others have create methods. What\u0027s the difference?) And there\u0027s even a show method. Shouldn\u0027t these at least be consistent?","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"21f517361df7e3ac39d5f5b1a06f280456085e62","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            views.append(to_append)"},{"line_number":124,"context_line":"        return {resp_key: views}"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def data(self):"},{"line_number":127,"context_line":"        return self._build_create()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F90ig%3D","line":126,"in_reply_to":"AAAAWH%2F90ks%3D","updated":"2014-04-01 22:05:32.000000000","message":"it doesn\u0027t depends on what method returns","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"5a4ff0525943fe97058f387d29a611ed618a6cc2","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            views.append(to_append)"},{"line_number":124,"context_line":"        return {resp_key: views}"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def data(self):"},{"line_number":127,"context_line":"        return self._build_create()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F90ks%3D","line":126,"in_reply_to":"AAAAWH%2F91Ek%3D","updated":"2014-04-01 21:54:18.000000000","message":"In the only other data() method in this file, the data() method returns an un-nested dict whereas your data() returns a nested dict. My point is the apparent inconsistency.","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3f17330349b27e05b9426709857ae3eb91535b61","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            views.append(to_append)"},{"line_number":124,"context_line":"        return {resp_key: views}"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def data(self):"},{"line_number":127,"context_line":"        return self._build_create()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F91Ek%3D","line":126,"in_reply_to":"AAAAWH%2F91JA%3D","updated":"2014-04-01 20:32:20.000000000","message":"each view object should have method called data, take a look at another views","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"}],"trove/taskmanager/models.py":[{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"9552bd34f53782dd5a98e1474547a1d36ab7fbfa","unresolved":false,"context_lines":[{"line_number":654,"context_line":"            msg \u003d err_msg % {\u0027from\u0027: from_port, \u0027to\u0027: to_port}"},{"line_number":655,"context_line":"            raise MalformedSecurityGroupRuleError(message\u003dmsg)"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        def validate_cidr(cidr):"},{"line_number":658,"context_line":"            if not sg_models.is_cidr_valid(cidr):"},{"line_number":659,"context_line":"                self.update_db(task_status\u003derr)"},{"line_number":660,"context_line":"                msg \u003d _(\"Invalid CIDR: %s\") % cidr"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F90fA%3D","line":657,"updated":"2014-04-01 22:10:27.000000000","message":"additional cidr validation is outside of the scope of this fix; this patch\u0027s purpose is to remove the requirement of fields that aren\u0027t utilized any longer.","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"795e7b7c15ba6b2559ddb4959a5ec9ae3d20742f","unresolved":false,"context_lines":[{"line_number":661,"context_line":"                raise MalformedSecurityGroupRuleError(message\u003dmsg)"},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"        def _gen_ports(portstr):"},{"line_number":664,"context_line":"            from_port, sep, to_port \u003d portstr.partition(\u0027-\u0027)"},{"line_number":665,"context_line":"            if not (to_port and from_port):"},{"line_number":666,"context_line":"                if not sep:"},{"line_number":667,"context_line":"                    to_port \u003d from_port"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F91HY%3D","line":664,"updated":"2014-04-01 20:21:29.000000000","message":"This parsing logic occurs in two places. Can\u0027t this defined once and re-used?","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3f17330349b27e05b9426709857ae3eb91535b61","unresolved":false,"context_lines":[{"line_number":661,"context_line":"                raise MalformedSecurityGroupRuleError(message\u003dmsg)"},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"        def _gen_ports(portstr):"},{"line_number":664,"context_line":"            from_port, sep, to_port \u003d portstr.partition(\u0027-\u0027)"},{"line_number":665,"context_line":"            if not (to_port and from_port):"},{"line_number":666,"context_line":"                if not sep:"},{"line_number":667,"context_line":"                    to_port \u003d from_port"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F91EA%3D","line":664,"in_reply_to":"AAAAWH%2F91HY%3D","updated":"2014-04-01 20:32:20.000000000","message":"Common code was already re-used, take a more precise look at validation steps at previos files and at this one.","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"9552bd34f53782dd5a98e1474547a1d36ab7fbfa","unresolved":false,"context_lines":[{"line_number":676,"context_line":""},{"line_number":677,"context_line":"            from_, to_ \u003d _gen_ports(port_or_range)"},{"line_number":678,"context_line":"            cidr \u003d CONF.trove_security_group_rule_cidr"},{"line_number":679,"context_line":"            validate_cidr(cidr)"},{"line_number":680,"context_line":"            try:"},{"line_number":681,"context_line":"                sg_models.SecurityGroupRule.create_sec_group_rule("},{"line_number":682,"context_line":"                    s_group, protocol, int(from_), int(to_),"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F90e4%3D","line":679,"updated":"2014-04-01 22:10:27.000000000","message":"additional cidr validation is outside of the scope of this fix; this patch\u0027s purpose is to remove the requirement of fields that aren\u0027t utilized any longer.","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"}],"trove/tests/unittests/taskmanager/test_models.py":[{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"795e7b7c15ba6b2559ddb4959a5ec9ae3d20742f","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def test_create_sg_rules_success(self):"},{"line_number":279,"context_line":"        datastore_manager \u003d \u0027mysql\u0027"},{"line_number":280,"context_line":"        taskmanager_models.sg_models.SecurityGroup.create_for_instance \u003d Mock("},{"line_number":281,"context_line":"            return_value\u003d{\u0027id\u0027: uuid.uuid4(), \u0027name\u0027: uuid.uuid4()})"},{"line_number":282,"context_line":"        (taskmanager_models.sg_models."},{"line_number":283,"context_line":"         SecurityGroupRule.create_sec_group_rule) \u003d Mock()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F91Ik%3D","line":280,"updated":"2014-04-01 20:21:29.000000000","message":"With sg_models, you\u0027re taking advantage of an \"alias\" created for trove.taskmanager.models (aka taskmanager_models) own purposes. Isn\u0027t that a bad idea? Why not just do the import here:\n\n    from trove.extensions.security_group import models as sg_models","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"5a4ff0525943fe97058f387d29a611ed618a6cc2","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def test_create_sg_rules_success(self):"},{"line_number":279,"context_line":"        datastore_manager \u003d \u0027mysql\u0027"},{"line_number":280,"context_line":"        taskmanager_models.sg_models.SecurityGroup.create_for_instance \u003d Mock("},{"line_number":281,"context_line":"            return_value\u003d{\u0027id\u0027: uuid.uuid4(), \u0027name\u0027: uuid.uuid4()})"},{"line_number":282,"context_line":"        (taskmanager_models.sg_models."},{"line_number":283,"context_line":"         SecurityGroupRule.create_sec_group_rule) \u003d Mock()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F90nA%3D","line":280,"in_reply_to":"AAAAWH%2F91DY%3D","updated":"2014-04-01 21:54:18.000000000","message":"Sorry, I didn\u0027t mean to import inside the method. I meant to add the import at the top of the file then change the reference to sg_models.SecurityGroup.create_for_instance... The reason I proposed this is that if someone changes the import in trove.taskmanager.models from sg_models to secgroup_models, this class breaks. Seems like an unnecessary dependency.","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3f17330349b27e05b9426709857ae3eb91535b61","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def test_create_sg_rules_success(self):"},{"line_number":279,"context_line":"        datastore_manager \u003d \u0027mysql\u0027"},{"line_number":280,"context_line":"        taskmanager_models.sg_models.SecurityGroup.create_for_instance \u003d Mock("},{"line_number":281,"context_line":"            return_value\u003d{\u0027id\u0027: uuid.uuid4(), \u0027name\u0027: uuid.uuid4()})"},{"line_number":282,"context_line":"        (taskmanager_models.sg_models."},{"line_number":283,"context_line":"         SecurityGroupRule.create_sec_group_rule) \u003d Mock()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F91DY%3D","line":280,"in_reply_to":"AAAAWH%2F91Ik%3D","updated":"2014-04-01 20:32:20.000000000","message":"making imports inside the method is the worth idea.\ni mocked it by the full path to object, like it used inside the taskmanager models","commit_id":"0bbe42c0f9ae213cb962ff25f0959df93cb22edf"}]}
