def test_from_xml(self, Record, Number, Text, Index):
    src = '\n        <r>\n          <n v="1"/>\n          <x v="0"/>\n          <s v="2014-03-24"/>\n          <x v="0"/>\n          <n v="25"/>\n          <x v="0"/>\n        </r>\n        '
    node = fromstring(src)
    n = [Number(v=1), Number(v=25)]
    s = [Text(v='2014-03-24')]
    x = [Index(), Index(), Index()]
    fields = [Number(v=1), Index(), Text(v='2014-03-24'), Index(), Number(v=25), Index()]
    field = Record.from_tree(node)
    assert (field == Record(_fields=fields))
def test_from_xml(self, Record, Number, Text, Index):
    src = '\n        <r>\n          <n v="1"/>\n          <x v="0"/>\n          <s v="2014-03-24"/>\n          <x v="0"/>\n          <n v="25"/>\n          <x v="0"/>\n        </r>\n        '
    node = fromstring(src)
    n = [Number(v=1), Number(v=25)]
    s = [Text(v='2014-03-24')]
    x = [Index(), Index(), Index()]
    fields = [Number(v=1), Index(), Text(v='2014-03-24'), Index(), Number(v=25), Index()]
    field = Record.from_tree(node)
    assert (field == Record(_fields=fields))