)]}'
{"sysinv/sysinv/sysinv/sysinv/tests/conductor/test_kube_app_app_operator.py":[{"author":{"_account_id":14174,"name":"Bart Wensley","email":"bartwensley@hotmail.com","username":"bartwensley"},"change_message_id":"a8794b48d606213ba190a87230b1e2196290789d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        # Create kubernetes apps"},{"line_number":32,"context_line":"        test_app_1 \u003d dbutils.create_test_app(name\u003d\u0027test-app-1\u0027,"},{"line_number":33,"context_line":"                                             active\u003dTrue)"},{"line_number":34,"context_line":"        test_app_1._context \u003d self.context"},{"line_number":35,"context_line":"        self.assertEqual(test_app_1.active, True)"},{"line_number":36,"context_line":"        res \u003d self.service.activate(test_app_1)"},{"line_number":37,"context_line":"        # check was_active"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_57a33a9c","line":34,"range":{"start_line":34,"start_character":8,"end_line":34,"end_character":42},"updated":"2020-01-14 18:08:28.000000000","message":"I don\u0027t understand the purpose of this - the app object doesn\u0027t appear to use a _context member.","commit_id":"906e5c2a4806ef5e20ac8edc6abb60eea541aca9"},{"author":{"_account_id":14174,"name":"Bart Wensley","email":"bartwensley@hotmail.com","username":"bartwensley"},"change_message_id":"d9501075c753621ef1d8088d6c9f7ecaa0be919d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        # Create kubernetes apps"},{"line_number":32,"context_line":"        test_app_1 \u003d dbutils.create_test_app(name\u003d\u0027test-app-1\u0027,"},{"line_number":33,"context_line":"                                             active\u003dTrue)"},{"line_number":34,"context_line":"        test_app_1._context \u003d self.context"},{"line_number":35,"context_line":"        self.assertEqual(test_app_1.active, True)"},{"line_number":36,"context_line":"        res \u003d self.service.activate(test_app_1)"},{"line_number":37,"context_line":"        # check was_active"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_bdc5af92","line":34,"range":{"start_line":34,"start_character":8,"end_line":34,"end_character":42},"in_reply_to":"3fa7e38b_57a33a9c","updated":"2020-01-14 19:26:28.000000000","message":"OK - I understand now - the AppOperator class expects that all KubeApp objects it sees have the context set. Instead of setting the private _context method on the object, a cleaner way to do this is to call dbutils.create_test_app and then do this:\ntest_app_1 \u003d objects.KubeApp.get_byName(self.context, \u0027test-app-1\u0027)\n\nThis should result in the context being set.","commit_id":"906e5c2a4806ef5e20ac8edc6abb60eea541aca9"}]}
