)]}'
{"keystone/common/serializer.py":[{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"bc00c01e6aa125ebc80d83801e5d2c9a45c3b786","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"\"\"\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"from lxml import etree"},{"line_number":10,"context_line":"import re"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4j4%3D","line":9,"updated":"2012-02-21 04:15:55.000000000","message":"lxml needs to be added to pip-depends and pip-depends-test","commit_id":"bf7873df690cfd773a5ecaf1802dfaa1da5f5d73"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"3011b7fa34925881fb79b6bde8e2ebc19baed0cc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"\"\"\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"from lxml import etree"},{"line_number":10,"context_line":"import re"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4cc%3D","line":9,"in_reply_to":"AAAAEn%2F%2F4j4%3D","updated":"2012-02-21 16:45:20.000000000","message":"Done","commit_id":"bf7873df690cfd773a5ecaf1802dfaa1da5f5d73"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def from_xml(xml):"},{"line_number":18,"context_line":"    \"\"\"Deserialize XML to a dictionary\"\"\""},{"line_number":19,"context_line":"    if xml is None:"},{"line_number":20,"context_line":"        return None"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4Ik%3D","line":18,"updated":"2012-02-22 00:50:21.000000000","message":"please add periods to all of these, i won\u0027t mention the rest","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    for k, v in element.attrib.iteritems():"},{"line_number":43,"context_line":"        # boolean-looking attributes become booleans in JSON"},{"line_number":44,"context_line":"        if k in [\u0027enabled\u0027]:"},{"line_number":45,"context_line":"            if v in [\u0027true\u0027]:"},{"line_number":46,"context_line":"                v \u003d True"},{"line_number":47,"context_line":"            elif v in [\u0027false\u0027]:"},{"line_number":48,"context_line":"                v \u003d False"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4IQ%3D","line":45,"updated":"2012-02-22 00:50:21.000000000","message":"probably add 1 here?","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    for k, v in element.attrib.iteritems():"},{"line_number":43,"context_line":"        # boolean-looking attributes become booleans in JSON"},{"line_number":44,"context_line":"        if k in [\u0027enabled\u0027]:"},{"line_number":45,"context_line":"            if v in [\u0027true\u0027]:"},{"line_number":46,"context_line":"                v \u003d True"},{"line_number":47,"context_line":"            elif v in [\u0027false\u0027]:"},{"line_number":48,"context_line":"                v \u003d False"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3cg%3D","line":45,"in_reply_to":"AAAAEn%2F%2F4IQ%3D","updated":"2012-02-22 23:45:46.000000000","message":"I assume you mean \u00270\u0027 and \u00271\u0027 (strings), but I think the spec wants \u0027true\u0027 and \u0027false\u0027 [citation needed], and I\u0027d rather not encourage people to implement something other than spec, unless it comes up in bugs.","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        if k in [\u0027enabled\u0027]:"},{"line_number":45,"context_line":"            if v in [\u0027true\u0027]:"},{"line_number":46,"context_line":"                v \u003d True"},{"line_number":47,"context_line":"            elif v in [\u0027false\u0027]:"},{"line_number":48,"context_line":"                v \u003d False"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        values[k] \u003d v"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4IM%3D","line":47,"updated":"2012-02-22 00:50:21.000000000","message":"probably add 0 here?","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if \u0027_links\u0027 in key:"},{"line_number":73,"context_line":"            d.pop(key)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    assert len(d.keys()) \u003d\u003d 1, \\"},{"line_number":76,"context_line":"            \u0027Cannot encode more than one root element: %s\u0027 % d.keys()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    # name the root dom element"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4G0%3D","line":75,"updated":"2012-02-22 00:50:21.000000000","message":"can we wrap this in parens instead of escaping a newline","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if \u0027_links\u0027 in key:"},{"line_number":73,"context_line":"            d.pop(key)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    assert len(d.keys()) \u003d\u003d 1, \\"},{"line_number":76,"context_line":"            \u0027Cannot encode more than one root element: %s\u0027 % d.keys()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    # name the root dom element"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3cQ%3D","line":75,"in_reply_to":"AAAAEn%2F%2F4G0%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def populate_element(element, d):"},{"line_number":91,"context_line":"    \"\"\"Populates an etree with the given dictionary\"\"\""},{"line_number":92,"context_line":"    if isinstance(d, list):"},{"line_number":93,"context_line":"        for item in d:"},{"line_number":94,"context_line":"            # xsd compliance: child elements are singular: \u003cusers\u003e has \u003cuser\u003es"},{"line_number":95,"context_line":"            child \u003d etree.Element(element.tag[:-1])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4Fg%3D","line":92,"updated":"2012-02-22 00:50:21.000000000","message":"i\u0027d almost rather turn this giant switch into a class (or callable class), that has a bunch of protected submethods for each of these cases, like \n\nif isinstance(d, list):\n  self._populate_list(element, d)\nelse:\n  for k, v in dict.iteritems():\n    if isinstance(v, dict):\n      self._populate_dict(element, k, v)\n\nand so on, just because large switches become pretty difficult to read, so factoring out the work actually being done make it at least possible to follow which conditions trigger which behavior","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def populate_element(element, d):"},{"line_number":91,"context_line":"    \"\"\"Populates an etree with the given dictionary\"\"\""},{"line_number":92,"context_line":"    if isinstance(d, list):"},{"line_number":93,"context_line":"        for item in d:"},{"line_number":94,"context_line":"            # xsd compliance: child elements are singular: \u003cusers\u003e has \u003cuser\u003es"},{"line_number":95,"context_line":"            child \u003d etree.Element(element.tag[:-1])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3bg%3D","line":92,"in_reply_to":"AAAAEn%2F%2F4Fg%3D","updated":"2012-02-22 23:45:46.000000000","message":"I thought about doing that when I started but blew it off. I\u0027ll refactor.","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    if isinstance(d, list):"},{"line_number":93,"context_line":"        for item in d:"},{"line_number":94,"context_line":"            # xsd compliance: child elements are singular: \u003cusers\u003e has \u003cuser\u003es"},{"line_number":95,"context_line":"            child \u003d etree.Element(element.tag[:-1])"},{"line_number":96,"context_line":"            populate_element(child, item)"},{"line_number":97,"context_line":"            element.append(child)"},{"line_number":98,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4GU%3D","line":95,"updated":"2012-02-22 00:50:21.000000000","message":"maybe we can check that the last letter is \"s\" ? this seems a little broad","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    if isinstance(d, list):"},{"line_number":93,"context_line":"        for item in d:"},{"line_number":94,"context_line":"            # xsd compliance: child elements are singular: \u003cusers\u003e has \u003cuser\u003es"},{"line_number":95,"context_line":"            child \u003d etree.Element(element.tag[:-1])"},{"line_number":96,"context_line":"            populate_element(child, item)"},{"line_number":97,"context_line":"            element.append(child)"},{"line_number":98,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3bk%3D","line":95,"in_reply_to":"AAAAEn%2F%2F4GU%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                    if container is None:"},{"line_number":114,"context_line":"                        container \u003d etree.Element(k)"},{"line_number":115,"context_line":"                        element.append(container)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"                    name \u003d k[:-1]"},{"line_number":118,"context_line":"                elif k \u003d\u003d \u0027serviceCatalog\u0027:"},{"line_number":119,"context_line":"                    # xsd compliance: \u003cserviceCatalog\u003e contains \u003cservice\u003es"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4GA%3D","line":116,"updated":"2012-02-22 00:50:21.000000000","message":"could we kill this line","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                    if container is None:"},{"line_number":114,"context_line":"                        container \u003d etree.Element(k)"},{"line_number":115,"context_line":"                        element.append(container)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"                    name \u003d k[:-1]"},{"line_number":118,"context_line":"                elif k \u003d\u003d \u0027serviceCatalog\u0027:"},{"line_number":119,"context_line":"                    # xsd compliance: \u003cserviceCatalog\u003e contains \u003cservice\u003es"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3bo%3D","line":116,"in_reply_to":"AAAAEn%2F%2F4GA%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    # xsd compliance: \u003cserviceCatalog\u003e contains \u003cservice\u003es"},{"line_number":120,"context_line":"                    container \u003d etree.Element(k)"},{"line_number":121,"context_line":"                    element.append(container)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"                    name \u003d \u0027service\u0027"},{"line_number":124,"context_line":"                elif k \u003d\u003d \u0027values\u0027:"},{"line_number":125,"context_line":"                    # OS convention is to to contain lists in a \u0027values\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4GE%3D","line":122,"updated":"2012-02-22 00:50:21.000000000","message":"could we kill this line","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    # xsd compliance: \u003cserviceCatalog\u003e contains \u003cservice\u003es"},{"line_number":120,"context_line":"                    container \u003d etree.Element(k)"},{"line_number":121,"context_line":"                    element.append(container)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"                    name \u003d \u0027service\u0027"},{"line_number":124,"context_line":"                elif k \u003d\u003d \u0027values\u0027:"},{"line_number":125,"context_line":"                    # OS convention is to to contain lists in a \u0027values\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3bs%3D","line":122,"in_reply_to":"AAAAEn%2F%2F4GE%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"                    name \u003d \u0027service\u0027"},{"line_number":124,"context_line":"                elif k \u003d\u003d \u0027values\u0027:"},{"line_number":125,"context_line":"                    # OS convention is to to contain lists in a \u0027values\u0027"},{"line_number":126,"context_line":"                    # element, so the list itself can have attributes, which"},{"line_number":127,"context_line":"                    # is unnecessary in XML"},{"line_number":128,"context_line":"                    name \u003d element.tag[:-1]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4FY%3D","line":125,"updated":"2012-02-22 00:50:21.000000000","message":"to to","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"                    name \u003d \u0027service\u0027"},{"line_number":124,"context_line":"                elif k \u003d\u003d \u0027values\u0027:"},{"line_number":125,"context_line":"                    # OS convention is to to contain lists in a \u0027values\u0027"},{"line_number":126,"context_line":"                    # element, so the list itself can have attributes, which"},{"line_number":127,"context_line":"                    # is unnecessary in XML"},{"line_number":128,"context_line":"                    name \u003d element.tag[:-1]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3bw%3D","line":125,"in_reply_to":"AAAAEn%2F%2F4FY%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            elif k in [\u0027description\u0027] and isinstance(v, basestring):"},{"line_number":142,"context_line":"                # always becomes an element"},{"line_number":143,"context_line":"                child \u003d etree.Element(k)"},{"line_number":144,"context_line":"                child.text \u003d v"},{"line_number":145,"context_line":"                element.append(child)"},{"line_number":146,"context_line":"            else:"},{"line_number":147,"context_line":"                # add attributes to the current element"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4Fc%3D","line":144,"updated":"2012-02-22 00:50:21.000000000","message":"should this be unicode()ed too?","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            elif k in [\u0027description\u0027] and isinstance(v, basestring):"},{"line_number":142,"context_line":"                # always becomes an element"},{"line_number":143,"context_line":"                child \u003d etree.Element(k)"},{"line_number":144,"context_line":"                child.text \u003d v"},{"line_number":145,"context_line":"                element.append(child)"},{"line_number":146,"context_line":"            else:"},{"line_number":147,"context_line":"                # add attributes to the current element"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3b0%3D","line":144,"in_reply_to":"AAAAEn%2F%2F4Fc%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"0ddb419888d87753675e2a4b1d838010cff642ef","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        # current spec does not have attributes on an element with text"},{"line_number":72,"context_line":"        values \u003d values or text or {}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        for child in map(self.walk_element, element):"},{"line_number":75,"context_line":"            values \u003d dict(values.items() + child.items())"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        return {XmlDeserializer._tag_name(element.tag): values}"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F2Js%3D","line":74,"updated":"2012-02-25 01:26:55.000000000","message":"list comprehensions are generally preferred to map calls (map raises a pylint warning)","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"78730b26a03abea79c04017c0882e6cc58dbe330","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        # current spec does not have attributes on an element with text"},{"line_number":72,"context_line":"        values \u003d values or text or {}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        for child in map(self.walk_element, element):"},{"line_number":75,"context_line":"            values \u003d dict(values.items() + child.items())"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        return {XmlDeserializer._tag_name(element.tag): values}"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F10c%3D","line":74,"in_reply_to":"AAAAEn%2F%2F2Js%3D","updated":"2012-02-27 15:57:39.000000000","message":"Done","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"0ddb419888d87753675e2a4b1d838010cff642ef","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        name \u003d d.keys()[0]"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        # only the root dom element gets an xlmns"},{"line_number":99,"context_line":"        root \u003d etree.Element(name, xmlns\u003dxmlns or XMLNS)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.populate_element(root, d[name])"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F2Jo%3D","line":99,"updated":"2012-02-25 01:26:55.000000000","message":"could you put parens around the xmlns or XMLNS part, pls? it looks kinda scary otherwise","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"78730b26a03abea79c04017c0882e6cc58dbe330","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        name \u003d d.keys()[0]"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        # only the root dom element gets an xlmns"},{"line_number":99,"context_line":"        root \u003d etree.Element(name, xmlns\u003dxmlns or XMLNS)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.populate_element(root, d[name])"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F10Y%3D","line":99,"in_reply_to":"AAAAEn%2F%2F2Jo%3D","updated":"2012-02-27 15:57:39.000000000","message":"Done","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"}],"keystone/middleware/core.py":[{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        request.environ[PARAMS_ENV] \u003d params"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"class XmlBodyMiddleware(wsgi.Middleware):"},{"line_number":132,"context_line":"    \"\"\"De/serializes XML to/from JSON\"\"\""},{"line_number":133,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwsgi.Request)"},{"line_number":134,"context_line":"    def __call__(self, request):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4FU%3D","line":131,"updated":"2012-02-22 00:50:21.000000000","message":"cute","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        request.environ[PARAMS_ENV] \u003d params"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"class XmlBodyMiddleware(wsgi.Middleware):"},{"line_number":132,"context_line":"    \"\"\"De/serializes XML to/from JSON\"\"\""},{"line_number":133,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwsgi.Request)"},{"line_number":134,"context_line":"    def __call__(self, request):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3ac%3D","line":131,"in_reply_to":"AAAAEn%2F%2F4FU%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"}],"tests/test_content_types.py":[{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"bc00c01e6aa125ebc80d83801e5d2c9a45c3b786","unresolved":false,"context_lines":[{"line_number":11,"context_line":"import default_fixtures"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"class ContentTestCase(test.TestCase):"},{"line_number":15,"context_line":"    \"\"\"Performs tests against the WSGI app over HTTP."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    Defines a ``request`` method for use in test cases that makes"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4jg%3D","line":14,"updated":"2012-02-21 04:15:55.000000000","message":"can\u0027t we make this a subclass of CompatTestCase (test_keystoneclient) so that we can re-use the tests and expand on that set to cover the XML variation with a subclass there?\n\nThis looks remarkably similar to that code...","commit_id":"bf7873df690cfd773a5ecaf1802dfaa1da5f5d73"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"3011b7fa34925881fb79b6bde8e2ebc19baed0cc","unresolved":false,"context_lines":[{"line_number":11,"context_line":"import default_fixtures"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"class ContentTestCase(test.TestCase):"},{"line_number":15,"context_line":"    \"\"\"Performs tests against the WSGI app over HTTP."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    Defines a ``request`` method for use in test cases that makes"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4cE%3D","line":14,"in_reply_to":"AAAAEn%2F%2F4jg%3D","updated":"2012-02-21 16:45:20.000000000","message":"It is a bit similar (in that it fires up the wsgi app), but the client doesn\u0027t support XML, and even if it did, it would abstract that away from the end user by exposing dictionaries / popo\u0027s. These tests interact directly with wsgi over http because they need to control \u0026 assert the request/response headers and actual body content.","commit_id":"bf7873df690cfd773a5ecaf1802dfaa1da5f5d73"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"bc00c01e6aa125ebc80d83801e5d2c9a45c3b786","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        connection \u003d httplib.HTTPConnection(host, port, timeout\u003d10)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        # Perform the request"},{"line_number":59,"context_line":"        # print headers # TODO(dolph): remove before merging"},{"line_number":60,"context_line":"        connection.request(method, path, body, headers)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        # Retrieve the response so we can close the connection"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4js%3D","line":59,"updated":"2012-02-21 04:15:55.000000000","message":"probably want to do your \"TODO\" there","commit_id":"bf7873df690cfd773a5ecaf1802dfaa1da5f5d73"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"bc00c01e6aa125ebc80d83801e5d2c9a45c3b786","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        response \u003d connection.getresponse()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        response.body \u003d response.read()"},{"line_number":66,"context_line":"        # print response.getheaders() # TODO(dolph): remove before merging"},{"line_number":67,"context_line":"        # print response.body # TODO(dolph): remove before merging"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Close the connection"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4jo%3D","line":66,"updated":"2012-02-21 04:15:55.000000000","message":"ditto re: TODO","commit_id":"bf7873df690cfd773a5ecaf1802dfaa1da5f5d73"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"bc00c01e6aa125ebc80d83801e5d2c9a45c3b786","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        raise NotImplementedError()"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class JsonTestCase(ContentTestCase):"},{"line_number":205,"context_line":"    content_type \u003d \u0027json\u0027"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def _get_token_id(self, r):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4jc%3D","line":204,"updated":"2012-02-21 04:15:55.000000000","message":"what\u0027s the value of these tests outside of test_keystoneclient, which actively uses the client to test the API. If these have independent tests, let\u0027s refactor to use the same tests against multiple backends using the subclass mechanism we have set up already instead of introducing separate tests in multiple places that cover the same thing.","commit_id":"bf7873df690cfd773a5ecaf1802dfaa1da5f5d73"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"3011b7fa34925881fb79b6bde8e2ebc19baed0cc","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        raise NotImplementedError()"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class JsonTestCase(ContentTestCase):"},{"line_number":205,"context_line":"    content_type \u003d \u0027json\u0027"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def _get_token_id(self, r):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4cM%3D","line":204,"in_reply_to":"AAAAEn%2F%2F4jc%3D","updated":"2012-02-21 16:45:20.000000000","message":"Differences: 1) these tests cover xml, 2) these tests make (hopefully) detailed assertions about all of the content being returned, and 3) these tests don\u0027t make assertions about the behavior of keystone.","commit_id":"bf7873df690cfd773a5ecaf1802dfaa1da5f5d73"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        # Contains the response headers, body, etc"},{"line_number":76,"context_line":"        return response"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def assertResponseSuccessful(self, response):"},{"line_number":79,"context_line":"        \"\"\"Asserts that a status code lies inside the 2xx range"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        :param response: :py:class:`httplib.HTTPResponse` to be"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4FQ%3D","line":78,"updated":"2012-02-22 00:50:21.000000000","message":"are these things that would be useful in test.TestCase?","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        # Contains the response headers, body, etc"},{"line_number":76,"context_line":"        return response"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def assertResponseSuccessful(self, response):"},{"line_number":79,"context_line":"        \"\"\"Asserts that a status code lies inside the 2xx range"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        :param response: :py:class:`httplib.HTTPResponse` to be"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3aY%3D","line":78,"in_reply_to":"AAAAEn%2F%2F4FQ%3D","updated":"2012-02-22 23:45:46.000000000","message":"Possibly; is there another test module that I can add them to?","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        self.assertIsNotNone(error.get(\u0027message\u0027))"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    # default content type to test"},{"line_number":119,"context_line":"    content_type \u003d \u0027json\u0027"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def restful_request(self, headers\u003dNone, body\u003dNone, token\u003dNone, **kwargs):"},{"line_number":122,"context_line":"        \"\"\"Serializes/deserializes json/xml as request/response body."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4FM%3D","line":119,"updated":"2012-02-22 00:50:21.000000000","message":"this should be at the top of the class def","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        self.assertIsNotNone(error.get(\u0027message\u0027))"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    # default content type to test"},{"line_number":119,"context_line":"    content_type \u003d \u0027json\u0027"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def restful_request(self, headers\u003dNone, body\u003dNone, token\u003dNone, **kwargs):"},{"line_number":122,"context_line":"        \"\"\"Serializes/deserializes json/xml as request/response body."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3aM%3D","line":119,"in_reply_to":"AAAAEn%2F%2F4FM%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        if token is not None:"},{"line_number":134,"context_line":"            headers[\u0027X-Auth-Token\u0027] \u003d token"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        # Attempt to encode JSON and XML automatically"},{"line_number":137,"context_line":"        if self.content_type \u003d\u003d \u0027json\u0027:"},{"line_number":138,"context_line":"            headers[\u0027Accept\u0027] \u003d \u0027application/json\u0027"},{"line_number":139,"context_line":"            if body:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4FI%3D","line":136,"updated":"2012-02-22 00:50:21.000000000","message":"maybe factor this into a separate function, since this is getting a little long anyway\n\nbody \u003d self._to_content_type(body, self.content_type)","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        if token is not None:"},{"line_number":134,"context_line":"            headers[\u0027X-Auth-Token\u0027] \u003d token"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        # Attempt to encode JSON and XML automatically"},{"line_number":137,"context_line":"        if self.content_type \u003d\u003d \u0027json\u0027:"},{"line_number":138,"context_line":"            headers[\u0027Accept\u0027] \u003d \u0027application/json\u0027"},{"line_number":139,"context_line":"            if body:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3ZY%3D","line":136,"in_reply_to":"AAAAEn%2F%2F4FI%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            header \u003d response.getheader(\u0027Content-Type\u0027, None)"},{"line_number":158,"context_line":"            self.assertIn(self.content_type, header)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"            if self.content_type \u003d\u003d \u0027json\u0027:"},{"line_number":161,"context_line":"                response.body \u003d json.loads(response.body)"},{"line_number":162,"context_line":"            elif self.content_type \u003d\u003d \u0027xml\u0027:"},{"line_number":163,"context_line":"                response.body \u003d etree.fromstring(response.body)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4FA%3D","line":160,"updated":"2012-02-22 00:50:21.000000000","message":"i\u0027d also make this into a separate method","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            header \u003d response.getheader(\u0027Content-Type\u0027, None)"},{"line_number":158,"context_line":"            self.assertIn(self.content_type, header)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"            if self.content_type \u003d\u003d \u0027json\u0027:"},{"line_number":161,"context_line":"                response.body \u003d json.loads(response.body)"},{"line_number":162,"context_line":"            elif self.content_type \u003d\u003d \u0027xml\u0027:"},{"line_number":163,"context_line":"                response.body \u003d etree.fromstring(response.body)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3Yw%3D","line":160,"in_reply_to":"AAAAEn%2F%2F4FA%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return response"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def public_request(self, port\u003dNone, **kwargs):"},{"line_number":173,"context_line":"        kwargs[\u0027port\u0027] \u003d port or self.public_server.socket_info[\u0027socket\u0027][1]"},{"line_number":174,"context_line":"        return self.restful_request(**kwargs)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def admin_request(self, port\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4E4%3D","line":173,"updated":"2012-02-22 00:50:21.000000000","message":"probably make a helper for this too, self._public_port()","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return response"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def public_request(self, port\u003dNone, **kwargs):"},{"line_number":173,"context_line":"        kwargs[\u0027port\u0027] \u003d port or self.public_server.socket_info[\u0027socket\u0027][1]"},{"line_number":174,"context_line":"        return self.restful_request(**kwargs)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def admin_request(self, port\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3Yk%3D","line":173,"in_reply_to":"AAAAEn%2F%2F4E4%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        return self.restful_request(**kwargs)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def admin_request(self, port\u003dNone, **kwargs):"},{"line_number":177,"context_line":"        kwargs[\u0027port\u0027] \u003d port or self.admin_server.socket_info[\u0027socket\u0027][1]"},{"line_number":178,"context_line":"        return self.restful_request(**kwargs)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def get_scoped_token(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4E0%3D","line":177,"updated":"2012-02-22 00:50:21.000000000","message":"ditto","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        return self.restful_request(**kwargs)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def admin_request(self, port\u003dNone, **kwargs):"},{"line_number":177,"context_line":"        kwargs[\u0027port\u0027] \u003d port or self.admin_server.socket_info[\u0027socket\u0027][1]"},{"line_number":178,"context_line":"        return self.restful_request(**kwargs)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def get_scoped_token(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3Yo%3D","line":177,"in_reply_to":"AAAAEn%2F%2F4E0%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                    # validate service endpoint"},{"line_number":240,"context_line":"                    self.assertIsNotNone(endpoint.get(\u0027publicURL\u0027))"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def assertValidTenant(self, tenant):"},{"line_number":243,"context_line":"        \"\"\"Applicable to XML and JSON.\"\"\""},{"line_number":244,"context_line":"        self.assertIsNotNone(tenant.get(\u0027id\u0027))"},{"line_number":245,"context_line":"        self.assertIsNotNone(tenant.get(\u0027name\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4Ew%3D","line":242,"updated":"2012-02-22 00:50:21.000000000","message":"should all these applicable to both ones be on the super class?","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        self.assertValidMultipleChoiceResponse(r)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def test_public_version_response(self):"},{"line_number":316,"context_line":"        raise nose.exc.SkipTest(\u0027Blocked by bug 925548\u0027)"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        r \u003d self.public_request(path\u003d\u0027/v2.0/\u0027)"},{"line_number":319,"context_line":"        self.assertValidVersionResponse(r)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4Es%3D","line":316,"updated":"2012-02-22 00:50:21.000000000","message":"i think this is fixed already","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        self.assertValidMultipleChoiceResponse(r)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def test_public_version_response(self):"},{"line_number":316,"context_line":"        raise nose.exc.SkipTest(\u0027Blocked by bug 925548\u0027)"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        r \u003d self.public_request(path\u003d\u0027/v2.0/\u0027)"},{"line_number":319,"context_line":"        self.assertValidVersionResponse(r)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3YY%3D","line":316,"in_reply_to":"AAAAEn%2F%2F4Es%3D","updated":"2012-02-22 23:45:46.000000000","message":"There\u0027s a multiple choice response implemented, but nothing for a particular version (a subset of the multiple choice response) -- should probably open a new bug, but I cited the most closely related issue instead.","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        self.assertValidVersionResponse(r)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def test_admin_version_response(self):"},{"line_number":322,"context_line":"        raise nose.exc.SkipTest(\u0027Blocked by bug 925548\u0027)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        r \u003d self.admin_request(path\u003d\u0027/v2.0/\u0027)"},{"line_number":325,"context_line":"        self.assertValidVersionResponse(r)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4Eo%3D","line":322,"updated":"2012-02-22 00:50:21.000000000","message":"i think this is fixed already","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            token\u003dself.get_scoped_token())"},{"line_number":355,"context_line":"        self.assertValidTenantListResponse(r)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def test_token_validation(self):"},{"line_number":358,"context_line":"        token \u003d self.get_scoped_token()"},{"line_number":359,"context_line":"        r \u003d self.admin_request(path\u003d\u0027/v2.0/tokens/%(token_id)s\u0027 % {"},{"line_number":360,"context_line":"                \u0027token_id\u0027: token,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4Ek%3D","line":357,"updated":"2012-02-22 00:50:21.000000000","message":"could you rename all these tests to use the same names as the methods they are hitting on the controller? i.e. user_details below is get_user","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            token\u003dself.get_scoped_token())"},{"line_number":355,"context_line":"        self.assertValidTenantListResponse(r)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def test_token_validation(self):"},{"line_number":358,"context_line":"        token \u003d self.get_scoped_token()"},{"line_number":359,"context_line":"        r \u003d self.admin_request(path\u003d\u0027/v2.0/tokens/%(token_id)s\u0027 % {"},{"line_number":360,"context_line":"                \u0027token_id\u0027: token,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3Tw%3D","line":357,"in_reply_to":"AAAAEn%2F%2F4Ek%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":427,"context_line":""},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"class XmlTestCase(JsonTestCase):"},{"line_number":430,"context_line":"    \"\"\"This XML test case extends the JSON tests to make assertions about XML."},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    \"\"\""},{"line_number":433,"context_line":"    xmlns \u003d \u0027http://docs.openstack.org/identity/api/v2.0\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4Ec%3D","line":430,"updated":"2012-02-22 00:50:21.000000000","message":"if this is extending all the json tests, it might make sense to put those in the superclass also, and make that class a mixin, similar to how we do test_backend.py","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":427,"context_line":""},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"class XmlTestCase(JsonTestCase):"},{"line_number":430,"context_line":"    \"\"\"This XML test case extends the JSON tests to make assertions about XML."},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    \"\"\""},{"line_number":433,"context_line":"    xmlns \u003d \u0027http://docs.openstack.org/identity/api/v2.0\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3YU%3D","line":430,"in_reply_to":"AAAAEn%2F%2F4Ec%3D","updated":"2012-02-22 23:45:46.000000000","message":"Yeah, I don\u0027t really like how I ended up organizing it. I didn\u0027t think about mixins though -- good call.","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"0ddb419888d87753675e2a4b1d838010cff642ef","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        # TODO(termie): add an admin user to the fixtures and use that user"},{"line_number":58,"context_line":"        # override the fixtures, for now"},{"line_number":59,"context_line":"        self.metadata_foobar \u003d self.identity_api.update_metadata("},{"line_number":60,"context_line":"            self.user_foo[\u0027id\u0027], self.tenant_bar[\u0027id\u0027],"},{"line_number":61,"context_line":"            dict(roles\u003d[\u0027keystone_admin\u0027], is_admin\u003d\u00271\u0027))"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def tearDown(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F2Jk%3D","line":60,"updated":"2012-02-25 01:26:55.000000000","message":"one item per line, double indented","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"78730b26a03abea79c04017c0882e6cc58dbe330","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        # TODO(termie): add an admin user to the fixtures and use that user"},{"line_number":58,"context_line":"        # override the fixtures, for now"},{"line_number":59,"context_line":"        self.metadata_foobar \u003d self.identity_api.update_metadata("},{"line_number":60,"context_line":"            self.user_foo[\u0027id\u0027], self.tenant_bar[\u0027id\u0027],"},{"line_number":61,"context_line":"            dict(roles\u003d[\u0027keystone_admin\u0027], is_admin\u003d\u00271\u0027))"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def tearDown(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F10E%3D","line":60,"in_reply_to":"AAAAEn%2F%2F2Jk%3D","updated":"2012-02-27 15:57:39.000000000","message":"Done","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"0ddb419888d87753675e2a4b1d838010cff642ef","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        super(RestfulTestCase, self).tearDown()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def request(self, host\u003d\u00270.0.0.0\u0027, port\u003d80, method\u003d\u0027GET\u0027, path\u003d\u0027/\u0027,"},{"line_number":72,"context_line":"            headers\u003dNone, body\u003dNone, expected_status\u003dNone):"},{"line_number":73,"context_line":"        \"\"\"Perform request and fetch httplib.HTTPResponse from the server.\"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        # Initialize headers dictionary"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F2Jg%3D","line":72,"updated":"2012-02-25 01:26:55.000000000","message":"indent to parens","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"78730b26a03abea79c04017c0882e6cc58dbe330","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        super(RestfulTestCase, self).tearDown()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def request(self, host\u003d\u00270.0.0.0\u0027, port\u003d80, method\u003d\u0027GET\u0027, path\u003d\u0027/\u0027,"},{"line_number":72,"context_line":"            headers\u003dNone, body\u003dNone, expected_status\u003dNone):"},{"line_number":73,"context_line":"        \"\"\"Perform request and fetch httplib.HTTPResponse from the server.\"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        # Initialize headers dictionary"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F10A%3D","line":72,"in_reply_to":"AAAAEn%2F%2F2Jg%3D","updated":"2012-02-27 15:57:39.000000000","message":"Done","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"0ddb419888d87753675e2a4b1d838010cff642ef","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        self.assertIsNotNone(tenant.get(\u0027name\u0027))"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"class JsonContentAssertionsMixin(ContentAssertionsMixin):"},{"line_number":262,"context_line":"    \"\"\"JSON-specific content assertions.\"\"\""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def assertValidErrorResponse(self, r):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F2JY%3D","line":261,"updated":"2012-02-25 01:26:55.000000000","message":"honestly i probably wouldn\u0027t have separated these assertions from the test case, i just think the testcases that were shared by both xml and json should be a mixin to the test case.\n\nbasically i think this adds significantly more complexity than just putting the shared tests in a shared object, we don\u0027t need an entire mixin system, we\u0027re not going for normal form or componentization patterns, the only reason it even matters that the shared tests are treated as a mixin is because we don\u0027t want them to get run on their own\n\nso, ContentAssertionsMixin would be part of CoreApiTests(object)\n\nand you\u0027d have a JsonApiTests(test.TestCase, CoreApiTests) with the contents of the JsonContentAssertionsMixin code inside that.","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"78730b26a03abea79c04017c0882e6cc58dbe330","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        self.assertIsNotNone(tenant.get(\u0027name\u0027))"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"class JsonContentAssertionsMixin(ContentAssertionsMixin):"},{"line_number":262,"context_line":"    \"\"\"JSON-specific content assertions.\"\"\""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def assertValidErrorResponse(self, r):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F1z8%3D","line":261,"in_reply_to":"AAAAEn%2F%2F2JY%3D","updated":"2012-02-27 15:57:39.000000000","message":"Done","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"}],"tests/test_middleware.py":[{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"028834007987f9f2c9e9efafd1a2435ff0a11353","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"# under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import json"},{"line_number":18,"context_line":"import webob"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from keystone import config"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F4EU%3D","line":17,"updated":"2012-02-22 00:50:21.000000000","message":"newline between stdlib and thirdparty imports","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"437913e7d80d9b03bdcf5fd175699a7861e0d735","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"# under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import json"},{"line_number":18,"context_line":"import webob"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from keystone import config"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F3Y0%3D","line":17,"in_reply_to":"AAAAEn%2F%2F4EU%3D","updated":"2012-02-22 23:45:46.000000000","message":"Done","commit_id":"f86c78606faa54a4f72e12af7645eaa9d2a699e9"}],"tests/test_serializer.py":[{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"0ddb419888d87753675e2a4b1d838010cff642ef","unresolved":false,"context_lines":[{"line_number":3,"context_line":"import re"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"from keystone.common import serializer"},{"line_number":6,"context_line":"from keystone import test"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"class XmlSerializerTestCase(test.TestCase):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F2Ic%3D","line":6,"updated":"2012-02-25 01:26:55.000000000","message":"flip the order of these two imports pls","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"78730b26a03abea79c04017c0882e6cc58dbe330","unresolved":false,"context_lines":[{"line_number":3,"context_line":"import re"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"from keystone.common import serializer"},{"line_number":6,"context_line":"from keystone import test"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"class XmlSerializerTestCase(test.TestCase):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F1z4%3D","line":6,"in_reply_to":"AAAAEn%2F%2F2Ic%3D","updated":"2012-02-27 15:57:39.000000000","message":"Done","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"}],"tests/test_versions.py":[{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"0ddb419888d87753675e2a4b1d838010cff642ef","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                        },{"},{"line_number":110,"context_line":"                            \"base\": \"application/xml\","},{"line_number":111,"context_line":"                            \"type\": \"application/vnd.openstack.identity-v2.0\""},{"line_number":112,"context_line":"                                     \"+xml\""},{"line_number":113,"context_line":"                        }]"},{"line_number":114,"context_line":"                }]"},{"line_number":115,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F2IQ%3D","line":112,"updated":"2012-02-25 01:26:55.000000000","message":"normally i would think this is a weird indent but yeah everything else in the file is this way so we can fix them all at some point in the future","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"78730b26a03abea79c04017c0882e6cc58dbe330","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                        },{"},{"line_number":110,"context_line":"                            \"base\": \"application/xml\","},{"line_number":111,"context_line":"                            \"type\": \"application/vnd.openstack.identity-v2.0\""},{"line_number":112,"context_line":"                                     \"+xml\""},{"line_number":113,"context_line":"                        }]"},{"line_number":114,"context_line":"                }]"},{"line_number":115,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEn%2F%2F1zw%3D","line":112,"in_reply_to":"AAAAEn%2F%2F2IQ%3D","updated":"2012-02-27 15:57:39.000000000","message":"Done","commit_id":"bf86d952ab3699588e4fb758de355b90b7b3596d"}]}
