e2e: fixture skips empty folders
This commit is contained in:
1 parent
bc600c27a0
commit
7e01130172
1 file changed
+4
-1
@@ -94,9 +94,12 @@ def inspect(user, password):
|
|||||||
boxes.append(m.group(3).decode())
|
boxes.append(m.group(3).decode())
|
||||||
out = {"boxes": boxes, "folders": {}}
|
out = {"boxes": boxes, "folders": {}}
|
||||||
for b in boxes:
|
for b in boxes:
|
||||||
typ, _ = c.select(f'"{b}"', readonly=True)
|
typ, count = c.select(f'"{b}"', readonly=True)
|
||||||
if typ != "OK":
|
if typ != "OK":
|
||||||
continue
|
continue
|
||||||
|
if int(count[0]) == 0: # Dovecot answers FETCH 1:* on an empty box with BAD
|
||||||
|
out["folders"][b] = []
|
||||||
|
continue
|
||||||
typ, data = c.fetch("1:*", "(FLAGS INTERNALDATE RFC822.SIZE BODY.PEEK[HEADER.FIELDS (MESSAGE-ID SUBJECT)])")
|
typ, data = c.fetch("1:*", "(FLAGS INTERNALDATE RFC822.SIZE BODY.PEEK[HEADER.FIELDS (MESSAGE-ID SUBJECT)])")
|
||||||
msgs = []
|
msgs = []
|
||||||
for item in data:
|
for item in data:
|
||||||
|
|||||||
Reference in new issue
Block a user