summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2013-03-26 15:29:20 +0100
committerPatrick Ohly <patrick.ohly@intel.com>2013-05-06 16:28:12 +0200
commitbe4b2393cdb46dc4d55798a29fb442667a783553 (patch)
tree11248023b25795624b37cb9b93efe21c65c572ed
parent48b577370f30ceabaf4636d804a037769588f7f2 (diff)
PIM testing: allow more than 1000 contacts in testActive
The sorting got broken when the number of contacts exceeds the 3 digits reserved via the 03d formatting specifier. Now allow four digits = up to 9999 contacts.
-rwxr-xr-xsrc/dbus/server/pim/testpim.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dbus/server/pim/testpim.py b/src/dbus/server/pim/testpim.py
index 270a82da..de7aac73 100755
--- a/src/dbus/server/pim/testpim.py
+++ b/src/dbus/server/pim/testpim.py
@@ -1669,8 +1669,8 @@ END:VCARD'''
output = open(item, "w")
output.write('''BEGIN:VCARD
VERSION:3.0
-FN:John_%(peer)s%(index)03d Doe
-N:Doe;John_%(peer)s%(index)03d
+FN:John_%(peer)s%(index)04d Doe
+N:Doe;John_%(peer)s%(index)04d
END:VCARD''' % {'peer': peer, 'index': index})
output.close()
@@ -1705,7 +1705,7 @@ END:VCARD''' % {'peer': peer, 'index': index})
del contact['source']
expected = [{'full-name': first + ' Doe',
'structured-name': {'given': first, 'family': 'Doe'}} for \
- first in ['John_%(peer)s%(index)03d' % {'peer': peer,
+ first in ['John_%(peer)s%(index)04d' % {'peer': peer,
'index': index} \
for peer in active \
for index in range(0, contactsPerPeer)] ]