Monotone-Parent: 55a3e83df8d5652ae3ebeec99432c0ae7f1e8c29

Monotone-Revision: 3a1e839e777209a5f153550867aea93a059ef056

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-10-07T19:26:12
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2009-10-07 19:26:12 +00:00
parent 59a851ccd0
commit b079ca84c1
1 changed files with 46 additions and 1 deletions

View File

@ -490,6 +490,37 @@ class DAVMailCollectionTest(unittest.TestCase):
## 1. test filter: size
# LARGER, SMALLER
#1 848
#2 4308
#3 699
filters = (({ "size": { "min": "300",
"max": "300" }},
[]),
({ "size": { "min": "800",
"max": "800" }},
[]),
({ "size": { "min": "5000",
"max": "5000" }},
[]),
({ "size": { "min": "838",
"max": "838" }},
[ msg1Loc ]),
({ "size": { "min": "699",
"max": "4308" }},
[ msg1Loc, msg2Loc, msg3Loc ]),
({ "size": { "min": "700",
"max": "4308" }},
[ msg1Loc, msg2Loc ]),
({ "size": { "min": "698",
"max": "848" }},
[ msg1Loc, msg3Loc ]),
({ "size": { "min": "300",
"max": "5000" },
"size": { "min": "840",
"max": "850",
"not": "true" }},
[ msg2Loc, msg3Loc ]))
## 1. test filter: answered
# ANSWERED, UNANSWERED
## 1. test filter: draft
@ -505,6 +536,21 @@ class DAVMailCollectionTest(unittest.TestCase):
## 1. test filter: keywords
# KEYWORD x
## 1. test filter: multiple combinations
filters = (({ "body": { "match": "Hello" },
"cc": { "match": "message1cc" }},
[ msg1Loc ]),
({ "to": { "match": "message" },
"uid": { "from": "1",
"to": "2" }},
[ msg1Loc, msg2Loc ]),
({ "to": { "match": "message" },
"uid": { "from": "1",
"to": "2" },
"cc": { "match": "message3cc" }},
[]))
self._testFilters(filters)
# 1. test sort: (receive-date) ARRIVAL
# 1. test sort: (date) DATE
# 1. test sort: CC
@ -552,6 +598,5 @@ class DAVMailCollectionTest(unittest.TestCase):
self._deleteCollection ("test-dav-mail")
if __name__ == "__main__":
unittest.main()