)]}'
{"refstack/api/app.py":[{"author":{"_account_id":17716,"name":"Luz Cazares","email":"luz.cazares@intel.com","username":"luzcazares"},"change_message_id":"d62a83d5eb62b59f6a454ad45347723ea67f4dc0","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                    \u0027specific capability files. Capability file names will \u0027"},{"line_number":96,"context_line":"                    \u0027be appended to this URL to get the contents of that file.\u0027"},{"line_number":97,"context_line":"               ),"},{"line_number":98,"context_line":"    cfg.StrOpt(\u0027disable_anonymous_upload\u0027,"},{"line_number":99,"context_line":"               default\u003dFalse,"},{"line_number":100,"context_line":"               help\u003d\u0027Disable anonymous uploads. All clients will need to \u0027"},{"line_number":101,"context_line":"                    \u0027authenticate and sign with a public/private keypair \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f485f77_092c6945","line":98,"range":{"start_line":98,"start_character":16,"end_line":98,"end_character":40},"updated":"2017-11-14 22:31:26.000000000","message":"Remove the word \u0027disable\u0027 from the name (avoid double negative). Also in general boolean value (BoolOpt) Enables or disables a given feature.\nIn this case, option should enable(True) /disable(False)  \"anonymous_upload\"","commit_id":"ea1490ab3d248cf780ff6dedeec6474b6b9f184d"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"71269f157bbec452db4dea7f997a9a6dfb5bbcf5","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                    \u0027specific capability files. Capability file names will \u0027"},{"line_number":96,"context_line":"                    \u0027be appended to this URL to get the contents of that file.\u0027"},{"line_number":97,"context_line":"               ),"},{"line_number":98,"context_line":"    cfg.StrOpt(\u0027disable_anonymous_upload\u0027,"},{"line_number":99,"context_line":"               default\u003dFalse,"},{"line_number":100,"context_line":"               help\u003d\u0027Disable anonymous uploads. All clients will need to \u0027"},{"line_number":101,"context_line":"                    \u0027authenticate and sign with a public/private keypair \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f485f77_ca3e35d9","line":98,"range":{"start_line":98,"start_character":16,"end_line":98,"end_character":40},"in_reply_to":"1f485f77_092c6945","updated":"2017-11-18 04:32:23.000000000","message":"Done","commit_id":"ea1490ab3d248cf780ff6dedeec6474b6b9f184d"},{"author":{"_account_id":17716,"name":"Luz Cazares","email":"luz.cazares@intel.com","username":"luzcazares"},"change_message_id":"d62a83d5eb62b59f6a454ad45347723ea67f4dc0","unresolved":false,"context_lines":[{"line_number":97,"context_line":"               ),"},{"line_number":98,"context_line":"    cfg.StrOpt(\u0027disable_anonymous_upload\u0027,"},{"line_number":99,"context_line":"               default\u003dFalse,"},{"line_number":100,"context_line":"               help\u003d\u0027Disable anonymous uploads. All clients will need to \u0027"},{"line_number":101,"context_line":"                    \u0027authenticate and sign with a public/private keypair \u0027"},{"line_number":102,"context_line":"                    \u0027previously uploaded to their user account.\u0027"},{"line_number":103,"context_line":"               )"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f485f77_49a5c1b4","line":100,"range":{"start_line":100,"start_character":21,"end_line":100,"end_character":28},"updated":"2017-11-14 22:31:26.000000000","message":"sed \u0027s/Disable/Enable or disable/g\u0027","commit_id":"ea1490ab3d248cf780ff6dedeec6474b6b9f184d"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"71269f157bbec452db4dea7f997a9a6dfb5bbcf5","unresolved":false,"context_lines":[{"line_number":97,"context_line":"               ),"},{"line_number":98,"context_line":"    cfg.StrOpt(\u0027disable_anonymous_upload\u0027,"},{"line_number":99,"context_line":"               default\u003dFalse,"},{"line_number":100,"context_line":"               help\u003d\u0027Disable anonymous uploads. All clients will need to \u0027"},{"line_number":101,"context_line":"                    \u0027authenticate and sign with a public/private keypair \u0027"},{"line_number":102,"context_line":"                    \u0027previously uploaded to their user account.\u0027"},{"line_number":103,"context_line":"               )"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f485f77_6a2f41a1","line":100,"range":{"start_line":100,"start_character":21,"end_line":100,"end_character":28},"in_reply_to":"1f485f77_49a5c1b4","updated":"2017-11-18 04:32:23.000000000","message":"Done","commit_id":"ea1490ab3d248cf780ff6dedeec6474b6b9f184d"}],"refstack/api/controllers/results.py":[{"author":{"_account_id":17716,"name":"Luz Cazares","email":"luz.cazares@intel.com","username":"luzcazares"},"change_message_id":"d62a83d5eb62b59f6a454ad45347723ea67f4dc0","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    def store_item(self, test):"},{"line_number":139,"context_line":"        \"\"\"Handler for storing item. Should return new item id.\"\"\""},{"line_number":140,"context_line":"        test_ \u003d test.copy()"},{"line_number":141,"context_line":"        if (CONF.api.disable_anonymous_upload and"},{"line_number":142,"context_line":"                (not pecan.request.headers.get(\u0027X-Public-Key\u0027))):"},{"line_number":143,"context_line":"            pecan.abort(400, \u0027Anonymous result uploads are disabled. Please \u0027"},{"line_number":144,"context_line":"                             \u0027create a user account and an api key at \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f485f77_29eba579","line":141,"range":{"start_line":141,"start_character":12,"end_line":141,"end_character":45},"updated":"2017-11-14 22:31:26.000000000","message":"if name is changed, this should be \u0027if (not CONF.api.anonymous_upload ...\u0027","commit_id":"ea1490ab3d248cf780ff6dedeec6474b6b9f184d"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"71269f157bbec452db4dea7f997a9a6dfb5bbcf5","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    def store_item(self, test):"},{"line_number":139,"context_line":"        \"\"\"Handler for storing item. Should return new item id.\"\"\""},{"line_number":140,"context_line":"        test_ \u003d test.copy()"},{"line_number":141,"context_line":"        if (CONF.api.disable_anonymous_upload and"},{"line_number":142,"context_line":"                (not pecan.request.headers.get(\u0027X-Public-Key\u0027))):"},{"line_number":143,"context_line":"            pecan.abort(400, \u0027Anonymous result uploads are disabled. Please \u0027"},{"line_number":144,"context_line":"                             \u0027create a user account and an api key at \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f485f77_b025a8ad","line":141,"range":{"start_line":141,"start_character":12,"end_line":141,"end_character":45},"in_reply_to":"1f485f77_29eba579","updated":"2017-11-18 04:32:23.000000000","message":"Done","commit_id":"ea1490ab3d248cf780ff6dedeec6474b6b9f184d"},{"author":{"_account_id":17716,"name":"Luz Cazares","email":"luz.cazares@intel.com","username":"luzcazares"},"change_message_id":"d62a83d5eb62b59f6a454ad45347723ea67f4dc0","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            pecan.abort(400, \u0027Anonymous result uploads are disabled. Please \u0027"},{"line_number":144,"context_line":"                             \u0027create a user account and an api key at \u0027"},{"line_number":145,"context_line":"                             \u0027https://refstack.openstack.org/#/\u0027)"},{"line_number":146,"context_line":"        else:"},{"line_number":147,"context_line":"            key \u003d pecan.request.headers.get(\u0027X-Public-Key\u0027).strip().split()[1]"},{"line_number":148,"context_line":"            if \u0027meta\u0027 not in test_:"},{"line_number":149,"context_line":"                test_[\u0027meta\u0027] \u003d {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f485f77_782f24a1","line":146,"range":{"start_line":146,"start_character":8,"end_line":146,"end_character":13},"updated":"2017-11-14 22:31:26.000000000","message":"Instead of else, leave the previous if which verifies if pecan header is set.\nThis is to cover the case when anonymous_upload is enabled and pecan header is not provided (currently it will enter to this else instead of going to line 169)","commit_id":"ea1490ab3d248cf780ff6dedeec6474b6b9f184d"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"71269f157bbec452db4dea7f997a9a6dfb5bbcf5","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            pecan.abort(400, \u0027Anonymous result uploads are disabled. Please \u0027"},{"line_number":144,"context_line":"                             \u0027create a user account and an api key at \u0027"},{"line_number":145,"context_line":"                             \u0027https://refstack.openstack.org/#/\u0027)"},{"line_number":146,"context_line":"        else:"},{"line_number":147,"context_line":"            key \u003d pecan.request.headers.get(\u0027X-Public-Key\u0027).strip().split()[1]"},{"line_number":148,"context_line":"            if \u0027meta\u0027 not in test_:"},{"line_number":149,"context_line":"                test_[\u0027meta\u0027] \u003d {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f485f77_d02264a4","line":146,"range":{"start_line":146,"start_character":8,"end_line":146,"end_character":13},"in_reply_to":"1f485f77_782f24a1","updated":"2017-11-18 04:32:23.000000000","message":"Done","commit_id":"ea1490ab3d248cf780ff6dedeec6474b6b9f184d"},{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"17458a6a19ad1209377279c961326e03563eff06","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                             \u0027https://refstack.openstack.org/#/\u0027)"},{"line_number":146,"context_line":"        if pecan.request.headers.get(\u0027X-Public-Key\u0027):"},{"line_number":147,"context_line":"            key \u003d pecan.request.headers.get(\u0027X-Public-Key\u0027).strip().split()[1]"},{"line_number":148,"context_line":"            if \u0027meta\u0027 not in test_:"},{"line_number":149,"context_line":"                test_[\u0027meta\u0027] \u003d {}"},{"line_number":150,"context_line":"            pubkey \u003d db.get_pubkey(key)"},{"line_number":151,"context_line":"            if not pubkey:"},{"line_number":152,"context_line":"                pecan.abort(400, \u0027User with specified key not found. \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff82abbf_647d62b0","line":149,"range":{"start_line":148,"start_character":0,"end_line":149,"end_character":34},"updated":"2017-11-21 07:35:34.000000000","message":"Bring the creation of the test_ working object and the check for meta together as one logical unit.","commit_id":"4cf71250a4a01d1dc7592f346fe1eee9d5079baa"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"d6696e78599da8361eb04f16a6be7360a198d521","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                             \u0027https://refstack.openstack.org/#/\u0027)"},{"line_number":146,"context_line":"        if pecan.request.headers.get(\u0027X-Public-Key\u0027):"},{"line_number":147,"context_line":"            key \u003d pecan.request.headers.get(\u0027X-Public-Key\u0027).strip().split()[1]"},{"line_number":148,"context_line":"            if \u0027meta\u0027 not in test_:"},{"line_number":149,"context_line":"                test_[\u0027meta\u0027] \u003d {}"},{"line_number":150,"context_line":"            pubkey \u003d db.get_pubkey(key)"},{"line_number":151,"context_line":"            if not pubkey:"},{"line_number":152,"context_line":"                pecan.abort(400, \u0027User with specified key not found. \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff82abbf_520f6436","line":149,"range":{"start_line":148,"start_character":0,"end_line":149,"end_character":34},"in_reply_to":"ff82abbf_647d62b0","updated":"2017-11-25 01:22:41.000000000","message":"Done","commit_id":"4cf71250a4a01d1dc7592f346fe1eee9d5079baa"},{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"17458a6a19ad1209377279c961326e03563eff06","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            key \u003d pecan.request.headers.get(\u0027X-Public-Key\u0027).strip().split()[1]"},{"line_number":148,"context_line":"            if \u0027meta\u0027 not in test_:"},{"line_number":149,"context_line":"                test_[\u0027meta\u0027] \u003d {}"},{"line_number":150,"context_line":"            pubkey \u003d db.get_pubkey(key)"},{"line_number":151,"context_line":"            if not pubkey:"},{"line_number":152,"context_line":"                pecan.abort(400, \u0027User with specified key not found. \u0027"},{"line_number":153,"context_line":"                                 \u0027Please log into the RefStack server to \u0027"},{"line_number":154,"context_line":"                                 \u0027upload your key.\u0027)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            test_[\u0027meta\u0027][const.USER] \u003d pubkey.openid"},{"line_number":157,"context_line":"            if test.get(\u0027cpid\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff82abbf_e4189282","line":154,"range":{"start_line":150,"start_character":0,"end_line":154,"end_character":52},"updated":"2017-11-21 07:35:34.000000000","message":"All of the identity checking code should go together (lines 141-147 above, for example). Let\u0027s try and simplify it too, as we make three calls to the get X-Public-Key.\n\nOne better way to handle it would be to write a new function that gets the pubkey from the database.\n\nThen, you can make an assertion that you must have a valid public key if anonymous results are disabled.","commit_id":"4cf71250a4a01d1dc7592f346fe1eee9d5079baa"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"d6696e78599da8361eb04f16a6be7360a198d521","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            key \u003d pecan.request.headers.get(\u0027X-Public-Key\u0027).strip().split()[1]"},{"line_number":148,"context_line":"            if \u0027meta\u0027 not in test_:"},{"line_number":149,"context_line":"                test_[\u0027meta\u0027] \u003d {}"},{"line_number":150,"context_line":"            pubkey \u003d db.get_pubkey(key)"},{"line_number":151,"context_line":"            if not pubkey:"},{"line_number":152,"context_line":"                pecan.abort(400, \u0027User with specified key not found. \u0027"},{"line_number":153,"context_line":"                                 \u0027Please log into the RefStack server to \u0027"},{"line_number":154,"context_line":"                                 \u0027upload your key.\u0027)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            test_[\u0027meta\u0027][const.USER] \u003d pubkey.openid"},{"line_number":157,"context_line":"            if test.get(\u0027cpid\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff82abbf_55d18e22","line":154,"range":{"start_line":150,"start_character":0,"end_line":154,"end_character":52},"in_reply_to":"ff82abbf_e4189282","updated":"2017-11-25 01:22:41.000000000","message":"Done","commit_id":"4cf71250a4a01d1dc7592f346fe1eee9d5079baa"},{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"17458a6a19ad1209377279c961326e03563eff06","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                                 \u0027upload your key.\u0027)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            test_[\u0027meta\u0027][const.USER] \u003d pubkey.openid"},{"line_number":157,"context_line":"            if test.get(\u0027cpid\u0027):"},{"line_number":158,"context_line":"                version \u003d db.get_product_version_by_cpid("},{"line_number":159,"context_line":"                    test[\u0027cpid\u0027], allowed_keys\u003d[\u0027id\u0027, \u0027product_id\u0027])"},{"line_number":160,"context_line":"                # Only auto-associate if there is a single product version"},{"line_number":161,"context_line":"                # with the given cpid."},{"line_number":162,"context_line":"                if len(version) \u003d\u003d 1:"},{"line_number":163,"context_line":"                    is_foundation \u003d api_utils.check_user_is_foundation_admin("},{"line_number":164,"context_line":"                        pubkey.openid)"},{"line_number":165,"context_line":"                    is_product_admin \u003d api_utils.check_user_is_product_admin("},{"line_number":166,"context_line":"                        version[0][\u0027product_id\u0027], pubkey.openid)"},{"line_number":167,"context_line":"                    if is_foundation or is_product_admin:"},{"line_number":168,"context_line":"                        test_[\u0027product_version_id\u0027] \u003d version[0][\u0027id\u0027]"},{"line_number":169,"context_line":"        test_id \u003d db.store_results(test_)"},{"line_number":170,"context_line":"        return {\u0027test_id\u0027: test_id,"},{"line_number":171,"context_line":"                \u0027url\u0027: parse.urljoin(CONF.ui_url,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff82abbf_84b18692","line":168,"range":{"start_line":157,"start_character":0,"end_line":168,"end_character":70},"updated":"2017-11-21 07:35:34.000000000","message":"Let\u0027s refactor this into a function. The readability of store_item is a bit rough right now","commit_id":"4cf71250a4a01d1dc7592f346fe1eee9d5079baa"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"d6696e78599da8361eb04f16a6be7360a198d521","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                                 \u0027upload your key.\u0027)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            test_[\u0027meta\u0027][const.USER] \u003d pubkey.openid"},{"line_number":157,"context_line":"            if test.get(\u0027cpid\u0027):"},{"line_number":158,"context_line":"                version \u003d db.get_product_version_by_cpid("},{"line_number":159,"context_line":"                    test[\u0027cpid\u0027], allowed_keys\u003d[\u0027id\u0027, \u0027product_id\u0027])"},{"line_number":160,"context_line":"                # Only auto-associate if there is a single product version"},{"line_number":161,"context_line":"                # with the given cpid."},{"line_number":162,"context_line":"                if len(version) \u003d\u003d 1:"},{"line_number":163,"context_line":"                    is_foundation \u003d api_utils.check_user_is_foundation_admin("},{"line_number":164,"context_line":"                        pubkey.openid)"},{"line_number":165,"context_line":"                    is_product_admin \u003d api_utils.check_user_is_product_admin("},{"line_number":166,"context_line":"                        version[0][\u0027product_id\u0027], pubkey.openid)"},{"line_number":167,"context_line":"                    if is_foundation or is_product_admin:"},{"line_number":168,"context_line":"                        test_[\u0027product_version_id\u0027] \u003d version[0][\u0027id\u0027]"},{"line_number":169,"context_line":"        test_id \u003d db.store_results(test_)"},{"line_number":170,"context_line":"        return {\u0027test_id\u0027: test_id,"},{"line_number":171,"context_line":"                \u0027url\u0027: parse.urljoin(CONF.ui_url,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff82abbf_78960996","line":168,"range":{"start_line":157,"start_character":0,"end_line":168,"end_character":70},"in_reply_to":"ff82abbf_84b18692","updated":"2017-11-25 01:22:41.000000000","message":"Done","commit_id":"4cf71250a4a01d1dc7592f346fe1eee9d5079baa"},{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"2ca17c23b13b65c053f10e44d60a8bac51cebba8","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    meta \u003d MetadataController()"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def _get_keys(self):"},{"line_number":107,"context_line":"        header_key \u003d pecan.request.headers.get(\u0027X-Public-Key\u0027)"},{"line_number":108,"context_line":"        if header_key:"},{"line_number":109,"context_line":"            key \u003d header_key.strip().split()[1]"},{"line_number":110,"context_line":"            if CONF.api.enable_anonymous_upload and not key:"}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_5379f6f9","line":107,"updated":"2018-01-09 22:11:37.000000000","message":"if not header_key and not enable_anonymous upload, then abort 400","commit_id":"705188b0603df25be77c3009740231762d638ee2"}],"refstack/tests/api/__init__.py":[{"author":{"_account_id":17716,"name":"Luz Cazares","email":"luz.cazares@intel.com","username":"luzcazares"},"change_message_id":"d62a83d5eb62b59f6a454ad45347723ea67f4dc0","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                                 content_type\u003dcontent_type,"},{"line_number":202,"context_line":"                                 **params)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        if self.CONF.api.disable_anonymous_upload and \\"},{"line_number":205,"context_line":"                not pecan.request.headers.get(\u0027X-Public-Key\u0027):"},{"line_number":206,"context_line":"            self.assertRaises(HTTPError, self.app.post)"},{"line_number":207,"context_line":"        if not expect_errors and response.content_type \u003d\u003d \u0027application/json\u0027:"},{"line_number":208,"context_line":"            response \u003d response.json"},{"line_number":209,"context_line":"        return response"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f485f77_5bb46235","line":206,"range":{"start_line":204,"start_character":8,"end_line":206,"end_character":55},"updated":"2017-11-14 22:31:26.000000000","message":"I don\u0027t think validation belongs here it should go into the test cases outside any conditional","commit_id":"ea1490ab3d248cf780ff6dedeec6474b6b9f184d"},{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"17458a6a19ad1209377279c961326e03563eff06","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                                 expect_errors\u003dexpect_errors,"},{"line_number":213,"context_line":"                                 content_type\u003dcontent_type,"},{"line_number":214,"context_line":"                                 **params)"},{"line_number":215,"context_line":"        if not self.CONF.api.enable_anonymous_upload:"},{"line_number":216,"context_line":"            self.assertEqual(response.status_code, 401)"},{"line_number":217,"context_line":"            return response.text"},{"line_number":218,"context_line":"        if not expect_errors and response.content_type \u003d\u003d \u0027application/json\u0027:"},{"line_number":219,"context_line":"            response \u003d response.json"},{"line_number":220,"context_line":"        return response"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def post_json_no_anon_upload_valid_key(self, url,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff82abbf_c7aa3084","line":219,"range":{"start_line":215,"start_character":0,"end_line":219,"end_character":36},"updated":"2017-11-21 07:35:34.000000000","message":"Lines 217 and 219 return different object types. This is the source of the test failures later on. The return shouldn\u0027t be response.text, rather response.json.","commit_id":"4cf71250a4a01d1dc7592f346fe1eee9d5079baa"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"d6696e78599da8361eb04f16a6be7360a198d521","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                                 expect_errors\u003dexpect_errors,"},{"line_number":213,"context_line":"                                 content_type\u003dcontent_type,"},{"line_number":214,"context_line":"                                 **params)"},{"line_number":215,"context_line":"        if not self.CONF.api.enable_anonymous_upload:"},{"line_number":216,"context_line":"            self.assertEqual(response.status_code, 401)"},{"line_number":217,"context_line":"            return response.text"},{"line_number":218,"context_line":"        if not expect_errors and response.content_type \u003d\u003d \u0027application/json\u0027:"},{"line_number":219,"context_line":"            response \u003d response.json"},{"line_number":220,"context_line":"        return response"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def post_json_no_anon_upload_valid_key(self, url,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff82abbf_66aad871","line":219,"range":{"start_line":215,"start_character":0,"end_line":219,"end_character":36},"in_reply_to":"ff82abbf_c7aa3084","updated":"2017-11-25 01:22:41.000000000","message":"Done","commit_id":"4cf71250a4a01d1dc7592f346fe1eee9d5079baa"}],"refstack/tests/api/test_products.py":[{"author":{"_account_id":17716,"name":"Luz Cazares","email":"luz.cazares@intel.com","username":"luzcazares"},"change_message_id":"d62a83d5eb62b59f6a454ad45347723ea67f4dc0","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        \"\"\"Test products endpoint with post request.\"\"\""},{"line_number":55,"context_line":"        product \u003d json.dumps(FAKE_PRODUCT)"},{"line_number":56,"context_line":"        actual_response \u003d self.post_json(self.URL, params\u003dproduct)"},{"line_number":57,"context_line":"        if self.CONF.api.disable_anonymous_upload and \\"},{"line_number":58,"context_line":"                not pecan.request.headers.get(\u0027X-Public-Key\u0027):"},{"line_number":59,"context_line":"            self.assertEqual(actual_response.status_code, 400)"},{"line_number":60,"context_line":"        self.assertIn(\u0027id\u0027, actual_response)"},{"line_number":61,"context_line":"        try:"},{"line_number":62,"context_line":"            uuid.UUID(actual_response.get(\u0027id\u0027), version\u003d4)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f485f77_bb223651","line":59,"range":{"start_line":57,"start_character":8,"end_line":59,"end_character":62},"updated":"2017-11-14 22:31:26.000000000","message":"This validation does not belong here in unit testing... \nAt unit testing you need one test case for the endpoint with post action and anonymous_upload enabled and one separate test case when option is disabled.\nThe settings for the test case should be modified within each test case before calling the action and the expected result is verified with asserts (response codes, ids, values, etc) directly from the response (not inside conditionals).\nTake a look at https://docs.python.org/2/library/unittest.html\n\nNote: default option value should allow backwards compatible action hence unit testing with default option value should give the same old behavior i.e old unit test must pass without modification... new test cases must be added to have coverage for the new non-default value","commit_id":"ea1490ab3d248cf780ff6dedeec6474b6b9f184d"}],"refstack/tests/api/test_vendors.py":[{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"1c7031d8fcf55361e0cd8a645d2c1c0b9c90a9da","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        if not self.CONF.api.enable_anonymous_upload:"},{"line_number":177,"context_line":"            self.assertEqual(post_response.status_code, 400)"},{"line_number":178,"context_line":"            return post_response.text"},{"line_number":179,"context_line":"        vendor_id \u003d post_response.get(\u0027id\u0027)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        # check update of properties"},{"line_number":182,"context_line":"        props \u003d {\u0027properties\u0027: {\u0027fake01\u0027: \u0027value01\u0027}}"}],"source_content_type":"text/x-python","patch_set":11,"id":"df87a7cf_c5d0d8fa","line":179,"updated":"2017-12-04 18:01:47.000000000","message":"post_response is a TestResponse object\n\nhttps://docs.pylonsproject.org/projects/webtest/en/latest/testresponse.html","commit_id":"ab08ffa6e293438169def11d7f9cd48b24053139"}],"setup-mysql-tests.sh":[{"author":{"_account_id":17716,"name":"Luz Cazares","email":"luz.cazares@intel.com","username":"luzcazares"},"change_message_id":"d62a83d5eb62b59f6a454ad45347723ea67f4dc0","unresolved":false,"context_lines":[{"line_number":21,"context_line":"mkfifo ${MYSQL_DATA}/out"},{"line_number":22,"context_line":"# On systems like Fedora here\u0027s where mysqld can be found"},{"line_number":23,"context_line":"PATH\u003d$PATH:/usr/libexec"},{"line_number":24,"context_line":"mysql --no-defaults --datadir\u003d${MYSQL_DATA} --pid-file\u003d${MYSQL_DATA}/mysql.pid --socket\u003d${MYSQL_DATA}/mysql.socket --skip-networking --skip-grant-tables \u0026\u003e ${MYSQL_DATA}/out \u0026"},{"line_number":25,"context_line":"# Wait for MySQL to start listening to connections"},{"line_number":26,"context_line":"wait_for_line \"mysqld: ready for connections.\" ${MYSQL_DATA}/out"},{"line_number":27,"context_line":"export REFSTACK_TEST_MYSQL_URL\u003d\"mysql+pymysql://root@localhost/test?unix_socket\u003d${MYSQL_DATA}/mysql.socket\u0026charset\u003dutf8\""}],"source_content_type":"text/x-sh","patch_set":6,"id":"1f485f77_8736fde5","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":5},"updated":"2017-11-14 22:31:26.000000000","message":"mysqld was correct, it refers to the server... \nIs there a reason to change it? Also does the exact same command works with mysql?","commit_id":"ea1490ab3d248cf780ff6dedeec6474b6b9f184d"}],"tools/cover.sh":[{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"17458a6a19ad1209377279c961326e03563eff06","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"ALLOWED_EXTRA_MISSING\u003d45"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"show_diff () {"},{"line_number":21,"context_line":"    head -1 $1"}],"source_content_type":"text/x-sh","patch_set":9,"id":"ff82abbf_e782d44f","line":18,"updated":"2017-11-21 07:35:34.000000000","message":"We shouldn\u0027t be doing this any more. The missing coverage is on the tests themselves.","commit_id":"4cf71250a4a01d1dc7592f346fe1eee9d5079baa"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"d6696e78599da8361eb04f16a6be7360a198d521","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"ALLOWED_EXTRA_MISSING\u003d45"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"show_diff () {"},{"line_number":21,"context_line":"    head -1 $1"}],"source_content_type":"text/x-sh","patch_set":9,"id":"ff82abbf_215a934e","line":18,"in_reply_to":"ff82abbf_e782d44f","updated":"2017-11-25 01:22:41.000000000","message":"I just don\u0027t know how quite to address that, given that, unless I\u0027m mistaken, I don\u0027t think testing the tests themselves is a thing, and It\u0027s causing the top cover test to fail.","commit_id":"4cf71250a4a01d1dc7592f346fe1eee9d5079baa"}]}
