def testInvalidInput(self):
mydb = db.DBMemory()
obj = server.Server(mydb)
ctx = server.Context("<unittest>")
with self.assertRaises(custom_exceptions.InvalidInput):
obj.updatePage(ctx,"Index",{})
with self.assertRaises(custom_exceptions.InvalidInput):
obj.updatePage(ctx,"Index",{"contentType":"mediawiki","content":{}})
评论列表
文章目录