# and an empty directory
d.addCallback(lambda res: self.GET(self.public_url + "/foo/empty/"))
def _check4(res):
- self.failUnless("directory is empty!" in res, res)
+ self.failUnless("directory is empty" in res, res)
+ MKDIR_BUTTON_RE=re.compile('<input type="hidden" name="t" value="mkdir" />.*<legend class="freeform-form-label">Create a new directory</legend>.*<input type="submit" value="Create" />', re.I)
+ self.failUnless(MKDIR_BUTTON_RE.search(res), res)
d.addCallback(_check4)
return d
if self.node.is_readonly():
return T.div["No upload forms: directory is read-only"]
- if not self.dirnode_children:
+ if self.dirnode_children is None:
return T.div["No upload forms: directory is unreadable"]
mkdir = T.form(action=".", method="post",
<td><n:slot name="info"/></td>
</tr>
- <tr n:pattern="empty"><td>directory is empty!</td></tr>
+ <tr n:pattern="empty"><td>directory is empty</td></tr>
</table>
</div>