def test_ctor(self, Record, Number, Text, Index):
    n = [Number(v=1), Number(v=25)]
    s = [Text(v='2014-03-24')]
    x = [Index(), Index(), Index()]
    fields = ((n + s) + x)
    field = Record(_fields=fields)
    xml = tostring(field.to_tree())
    expected = '\n        <r>\n          <n v="1"/>\n          <n v="25"/>\n          <s v="2014-03-24"/>\n          <x v="0"/>\n          <x v="0"/>\n          <x v="0"/>\n        </r>\n        '
    diff = compare_xml(xml, expected)
    assert (diff is None), diff
def test_ctor(self, Record, Number, Text, Index):
    n = [Number(v=1), Number(v=25)]
    s = [Text(v='2014-03-24')]
    x = [Index(), Index(), Index()]
    fields = ((n + s) + x)
    field = Record(_fields=fields)
    xml = tostring(field.to_tree())
    expected = '\n        <r>\n          <n v="1"/>\n          <n v="25"/>\n          <s v="2014-03-24"/>\n          <x v="0"/>\n          <x v="0"/>\n          <x v="0"/>\n        </r>\n        '
    diff = compare_xml(xml, expected)
    assert (diff is None), diff