)]}'
{"glance/tests/unit/test_db.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cee3e29cbd24b7c105a1845898be708ee1a2b580","unresolved":false,"context_lines":[{"line_number":33,"context_line":"UUID2 \u003d _gen_uuid()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"# When the timestamps are the same, we rely on the natural ordering"},{"line_number":37,"context_line":"# This relies on UUID1 \u003c UUID2.  Swap so that\u0027s the case."},{"line_number":38,"context_line":"if UUID1 \u003e UUID2:"},{"line_number":39,"context_line":"    UUID1, UUID2 \u003d UUID2, UUID1"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEn%2F%2F7qQ%3D","line":36,"updated":"2012-02-12 14:45:39.000000000","message":"Not sure I would call it \"natural ordering\", since the code is explicit that we order by created_at and id in addition to the specified sort key:\n\n    sort_dir_func \u003d {\n        \u0027asc\u0027: asc,\n        \u0027desc\u0027: desc,\n    }[sort_dir]\n\n    sort_key_attr \u003d getattr(models.Image, sort_key)\n    query \u003d query.order_by(sort_dir_func(sort_key_attr))\\\n                 .order_by(sort_dir_func(models.Image.created_at))\\\n                 .order_by(sort_dir_func(models.Image.id))\n\nSo, small nit, but could you change the note about natural ordering to read just \"the default sort order of results is whatever sort key is specified, plus created_at and id for ties\"? I think that would avoid any confusion by readers of this test case that may presume we are letting some database-specific natural ordering take place...","commit_id":"e3b91b44c95a97bf02b98ef69d50572e712a01b3"},{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"d5f5ca490604f61970268ba4f6c5d5f2056ebacf","unresolved":false,"context_lines":[{"line_number":36,"context_line":"# When the timestamps are the same, we rely on the natural ordering"},{"line_number":37,"context_line":"# This relies on UUID1 \u003c UUID2.  Swap so that\u0027s the case."},{"line_number":38,"context_line":"if UUID1 \u003e UUID2:"},{"line_number":39,"context_line":"    UUID1, UUID2 \u003d UUID2, UUID1"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"CONF \u003d {\u0027sql_connection\u0027: \u0027sqlite://\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEn%2F%2F7is%3D","line":39,"updated":"2012-02-13 15:23:21.000000000","message":"Why have logic at all? In Nova test modules we\u0027re hard-coding UUIDs, which seems like it would work here. Just make a smaller UUID and a larger one?","commit_id":"e3b91b44c95a97bf02b98ef69d50572e712a01b3"}]}
