tests: make it easier to move to other machine by sorting on url and other small changes

This commit is contained in:
Jean-Francois Dockes
2014-07-23 10:23:03 +02:00
parent 846079184a
commit c7a9aced05
10 changed files with 34 additions and 40 deletions
+4 -4
View File
@@ -34,11 +34,11 @@ for doc in query:
for fld in ('title', 'testfield', 'filename'):
print("getattr(doc, %s) -> [%s]"%(fld,utf8string(getattr(doc, fld))))
print("doc.get(%s) -> [%s]"%(fld,utf8string(doc.get(fld))))
print("\nfor fld in doc.keys():")
for fld in doc.keys():
print("\nfor fld in sorted(doc.keys()):")
for fld in sorted(doc.keys()):
print(utf8string("[%s] -> [%s]" % (fld, getattr(doc, fld))))
print("\nfor k,v in doc.items().items():")
for k,v in doc.items().items():
print("\nfor k,v in sorted(doc.items().items()):")
for k,v in sorted(doc.items().items(), key=lambda itm: itm[0]):
print(utf8string("[%s] -> [%s]" % (k, v)))
print("\nAccented query:")
+13 -13
View File
@@ -10,7 +10,7 @@ doc.get(testfield) -> [testfieldvalue1]
getattr(doc, filename) -> [htmlfield1.html]
doc.get(filename) -> [htmlfield1.html]
for fld in doc.keys():
for fld in sorted(doc.keys()):
[abstract] -> [ ThisIsTheFieldHtmlTestFile]
[caption] -> [HTML fields test file: été à noël]
[dbytes] -> [27]
@@ -24,29 +24,29 @@ for fld in doc.keys():
[pcbytes] -> [267]
[rcludi] -> [/home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html|]
[relevancyrating] -> [100%]
[sig] -> [2671383154417]
[sig] -> [2671402138880]
[testfield] -> [testfieldvalue1]
[title] -> [HTML fields test file: été à noël]
[url] -> [file:///home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html]
for k,v in doc.items().items():
[testfield] -> [testfieldvalue1]
[ipath] -> []
[url] -> [file:///home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html]
for k,v in sorted(doc.items().items()):
[abstract] -> [ ThisIsTheFieldHtmlTestFile]
[pcbytes] -> [267]
[caption] -> [HTML fields test file: été à noël]
[dbytes] -> [27]
[fbytes] -> [267]
[filename] -> [htmlfield1.html]
[mtype] -> [text/html]
[caption] -> [HTML fields test file: été à noël]
[fmtime] -> [01383154417]
[dbytes] -> [27]
[sig] -> [2671383154417]
[ipath] -> []
[mtime] -> [01383154417]
[title] -> [HTML fields test file: été à noël]
[mtype] -> [text/html]
[origcharset] -> [utf-8]
[pcbytes] -> [267]
[rcludi] -> [/home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html|]
[relevancyrating] -> [100%]
[origcharset] -> [utf-8]
[sig] -> [2671402138880]
[testfield] -> [testfieldvalue1]
[title] -> [HTML fields test file: été à noël]
[url] -> [file:///home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html]
Accented query:
User query [title:"été à noël"]