def METHOD_NAME(self):
    t = pipes.Template()
    # try a non-string command
    self.assertRaises(TypeError, t.prepend, 7, pipes.STDIN_STDOUT)
    # try a type that isn't recognized
    self.assertRaises(ValueError, t.prepend, 'tr a-z A-Z', 'xx')
    # shouldn't be able to prepend a sink
    self.assertRaises(ValueError, t.prepend, 'boguscmd', pipes.SINK)
    # check prepending two sources
    t = pipes.Template()
    t.prepend('boguscmd', pipes.SOURCE)
    self.assertRaises(ValueError, t.prepend, 'boguscmd', pipes.SOURCE)
    # command needing file input but with no $IN
    t = pipes.Template()
    self.assertRaises(ValueError, t.prepend, 'boguscmd $OUT',
                       pipes.FILEIN_FILEOUT)
    t = pipes.Template()
    self.assertRaises(ValueError, t.prepend, 'boguscmd',
                       pipes.FILEIN_STDOUT)
    # command needing file output but with no $OUT
    t = pipes.Template()
    self.assertRaises(ValueError, t.prepend, 'boguscmd $IN',
                       pipes.FILEIN_FILEOUT)
    t = pipes.Template()
    self.assertRaises(ValueError, t.prepend, 'boguscmd',
                       pipes.STDIN_FILEOUT)