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 a9e43ad950
commit 957bc1a11c
10 changed files with 34 additions and 40 deletions

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:")