예제 #1
0
 def dummy(client):
     # set the connection lost handler
     client.connectionLostHandler = conn_lost_handler
     # trigger an operation, which should
     yield client.dummy_authenticate("open sesame")
     root_id = yield client.get_root()
     # lock the user:
     usr = self.user_store.get(model.StorageUser, 0)
     usr.locked = True
     self.user_store.commit()
     client.make_dir(request.ROOT, root_id, u"open sesame")
     yield d
     # check we logged a warning about this.
     self.assertTrue(
         hdlr.check_warning("Shutting down protocol: user locked"))