)]}'
{"trove/common/db/mysql/models.py":[{"author":{"_account_id":25793,"name":"Jose Arthur Benetasso Villanova","email":"jose.arthur@gmail.com","username":"azlev"},"change_message_id":"572288ec9ee46fc0bf2efb6bb498c46f95db4319","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            # % is MySQL shorthand for \"everywhere\". Always permitted."},{"line_number":143,"context_line":"            # Null host defaults to % anyway."},{"line_number":144,"context_line":"            return True"},{"line_number":145,"context_line":"        if CONF.hostname_require_valid_ip:"},{"line_number":146,"context_line":"            try:"},{"line_number":147,"context_line":"                # \u0027%\u0027 works as a MySQL wildcard, but it is not a valid"},{"line_number":148,"context_line":"                # part of an IPNetwork"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_348421b1","line":145,"range":{"start_line":145,"start_character":16,"end_line":145,"end_character":41},"updated":"2017-04-25 15:29:12.000000000","message":"I didnt know this configuration option. It solves other host options like hostname or \u0027198.%\u0027.","commit_id":"f3d78d018d81775192afbe4e838ae80ae1070a2b"}],"trove/tests/unittests/guestagent/test_mysql_manager.py":[{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"f6a689b11b21796a0f28df04a756201200ef1cea","unresolved":false,"context_lines":[{"line_number":107,"context_line":"    def _empty_user(self):"},{"line_number":108,"context_line":"        return models.MySQLUser(deserializing\u003dTrue)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_valid_host_name(self):"},{"line_number":111,"context_line":"        test_host \u003d \"192.58.197.0/255.255.255.0\""},{"line_number":112,"context_line":"        user \u003d self._empty_user()"},{"line_number":113,"context_line":"        user.host \u003d test_host"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f013ff3_6b2524c2","line":110,"range":{"start_line":110,"start_character":13,"end_line":110,"end_character":27},"updated":"2017-05-16 19:45:06.000000000","message":"What are your intentions here, do you want to test the method you just changed or something more than that?\n\n\"test_update_host\" would be easier to understand what you\u0027re doing here because when I look at the code I see you are not calling the _is_valid_host_name function but rather you are simply testing the init and update of a MySQLUser. It would be good to mock out _valid_host_name here and have it return true for this test. In another test you can isolate the _is_valid_host_name and test it without creating and updating a user.\n\nThis will make it easier to identify such issues and their root cause in the future.\n\nI also see opportunities for negative testing, so again what are your intentions here?","commit_id":"f3d78d018d81775192afbe4e838ae80ae1070a2b"}]}
