def METHOD_NAME(self):
    import sys
    f = self.parsehelper(self.addtask_deltask)
    d = bb.parse.handle(f.name, self.d)['']
    stdout = sys.stdout.getvalue()
    self.assertTrue("addtask contained multiple 'before' keywords" in stdout)
    self.assertTrue("addtask contained multiple 'after' keywords" in stdout)
    self.assertTrue('addtask ignored: " do_patch"' in stdout)
    #self.assertTrue('dependent task do_foo for do_patch does not exist' in stdout)