)]}'
{"placement/tests/README.rst":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0881b4313daafd355f67b6bf0e4ecb7aad30b5b6","unresolved":false,"context_lines":[{"line_number":16,"context_line":"  (individual methods or classes) with minimal dependency on other code or on"},{"line_number":17,"context_line":"  externals like the database."},{"line_number":18,"context_line":"* Functional: tests which confirm a chunk of behavior, end to end, such as an"},{"line_number":19,"context_line":"  HTTP endpoint accept a body from a request and returning the expected"},{"line_number":20,"context_line":"  response but without reliance on code or services that are external to"},{"line_number":21,"context_line":"  placement."},{"line_number":22,"context_line":"* Integration: tests that confirm that things work with other services, such"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3f79a3b5_36cd3086","line":19,"range":{"start_line":19,"start_character":16,"end_line":19,"end_character":22},"updated":"2018-09-12 22:27:06.000000000","message":"accepting","commit_id":"c5affe592756ef100b85152740756ab7ede9f907"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5302d6496061551d5aaaf76acfc84dfbee57ccae","unresolved":false,"context_lines":[{"line_number":30,"context_line":"------------------"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Placement unit tests are based on the ``TestCase`` that comes with the"},{"line_number":33,"context_line":"``testtools`` package. Use mocks only as necessary. If you need a mock the code"},{"line_number":34,"context_line":"you are testing may benefit from being refactored to smaller units."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Writing Functional Tests"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3f79a3b5_56beac00","line":33,"range":{"start_line":33,"start_character":52,"end_line":33,"end_character":70},"updated":"2018-09-12 22:12:22.000000000","message":"\"If you find that you need multiple mocks...\"\n\nJust to not guilt someone when their unit had to make a call to LOG or some other external method.","commit_id":"c5affe592756ef100b85152740756ab7ede9f907"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"60e5ff1b5c5b92d76da1cdb9bf4ebba027971e35","unresolved":false,"context_lines":[{"line_number":30,"context_line":"------------------"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Placement unit tests are based on the ``TestCase`` that comes with the"},{"line_number":33,"context_line":"``testtools`` package. Use mocks only as necessary. If you need a mock the code"},{"line_number":34,"context_line":"you are testing may benefit from being refactored to smaller units."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Writing Functional Tests"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3f79a3b5_361f700a","line":33,"range":{"start_line":33,"start_character":52,"end_line":33,"end_character":70},"in_reply_to":"3f79a3b5_56beac00","updated":"2018-09-12 22:17:38.000000000","message":"yeah, fair enough","commit_id":"c5affe592756ef100b85152740756ab7ede9f907"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0881b4313daafd355f67b6bf0e4ecb7aad30b5b6","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Placement unit tests are based on the ``TestCase`` that comes with the"},{"line_number":33,"context_line":"``testtools`` package. Use mocks only as necessary. If you need a mock the code"},{"line_number":34,"context_line":"you are testing may benefit from being refactored to smaller units."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Writing Functional Tests"},{"line_number":37,"context_line":"------------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3f79a3b5_367bf029","line":34,"range":{"start_line":34,"start_character":50,"end_line":34,"end_character":67},"updated":"2018-09-12 22:27:06.000000000","message":"I think I need you to explain this to me (again?). If I have a method\n\n def foo():\n     A1\n     A2\n     B1\n     B2\n\nand I refactor it to smaller units:\n\n def foo():\n     A()\n     B()\n\n def A():\n     A1()\n     A2()\n\n def B():\n     B1()\n     B2()\n\nThen don\u0027t I need to mock A and B when I unit test foo? And how did this help me avoid e.g. mocking B1 when I unit test B?","commit_id":"c5affe592756ef100b85152740756ab7ede9f907"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a54ced36a00944074e62bdcc9be029e0a53eeff3","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Placement unit tests are based on the ``TestCase`` that comes with the"},{"line_number":33,"context_line":"``testtools`` package. Use mocks only as necessary. If you need a mock the code"},{"line_number":34,"context_line":"you are testing may benefit from being refactored to smaller units."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Writing Functional Tests"},{"line_number":37,"context_line":"------------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3f79a3b5_36f7708f","line":34,"range":{"start_line":34,"start_character":50,"end_line":34,"end_character":67},"in_reply_to":"3f79a3b5_367bf029","updated":"2018-09-12 22:31:14.000000000","message":"If that\u0027s the case, you simply don\u0027t test foo(), at least not via a _unit_ test.","commit_id":"c5affe592756ef100b85152740756ab7ede9f907"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2d44e75a73af8770846d92efbdfe9dbc150030d3","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Placement unit tests are based on the ``TestCase`` that comes with the"},{"line_number":33,"context_line":"``testtools`` package. Use mocks only as necessary. If you need a mock the code"},{"line_number":34,"context_line":"you are testing may benefit from being refactored to smaller units."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Writing Functional Tests"},{"line_number":37,"context_line":"------------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3f79a3b5_168b54c0","line":34,"range":{"start_line":34,"start_character":50,"end_line":34,"end_character":67},"in_reply_to":"3f79a3b5_36f7708f","updated":"2018-09-12 22:39:26.000000000","message":"foo(), as a unit, just calls other actual units. So really all you could unit test for foo() would be that it indeed made those calls, which is essentially testing \"does Python work?\"","commit_id":"c5affe592756ef100b85152740756ab7ede9f907"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0881b4313daafd355f67b6bf0e4ecb7aad30b5b6","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"* Testing database operations. These are based on"},{"line_number":42,"context_line":"  ``placement.tests.functional.base.TestCase`` which is responsible for"},{"line_number":43,"context_line":"  starting an in memory database and a reasonable minimal configuration."},{"line_number":44,"context_line":"* Testing the HTTP API using `gabbi`_."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Writing Integration Tests"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3f79a3b5_569b0c63","line":43,"range":{"start_line":43,"start_character":14,"end_line":43,"end_character":23},"updated":"2018-09-12 22:27:06.000000000","message":"nit: in-memory","commit_id":"c5affe592756ef100b85152740756ab7ede9f907"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b1c07fc5078714d4647b656c71fe6e3dee0725fe","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Placement configures its gate and check jobs via the ``.zuul.yaml`` file in the"},{"line_number":51,"context_line":"root of the code repository. Some of the entries in that file configure"},{"line_number":52,"context_line":"integration jobs, many of which use tempest."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":".. _gabbi: https://gabbi.readthedocs.io/"},{"line_number":55,"context_line":".. _contributor docs: https://docs.openstack.org/placement/latest/contributor/"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3f79a3b5_7d8a8464","line":52,"range":{"start_line":52,"start_character":36,"end_line":52,"end_character":43},"updated":"2018-09-14 15:34:31.000000000","message":"would be nice to link to the tempest doc https://docs.openstack.org/tempest/latest/\n\nI\u0027ve pushed a follow up to add the link.","commit_id":"63267a07ab9f438a7060c8a37e813d49d7eafc59"}]}
