def setUp(self):
     print 'copy template files to /tmp directory'
     mc = FileUtils();
     templatedir="/home/jy2947/Documents/eclipse-workspace/bime/scripts/mysql"
     shutil.copyfile(templatedir+"/"+"auto_increment.template","/tmp/auto_increment.template")
     shutil.copyfile(templatedir+"/"+"createDatabase.template","/tmp/createDatabase.template")
     shutil.copyfile(templatedir+"/"+"dropDatabase.template","/tmp/dropDatabase.template")
     shutil.copyfile(templatedir+"/"+"initialize_lab.template","/tmp/initialize_lab.template")
     shutil.copyfile(templatedir+"/"+"jdbc.properties.template","/tmp/jdbc.properties.template")
     
     mc.remove('/tmp','*.sql')
     mc.remove('/tmp','*.properties')
 def testWriteWithTemplate(self):
     mc = FileUtils()
     mc.write_with_template("/tmp/t.me", "./my.template", this="summer", that="winter")
 def testConcat(self):
     print "testing!"
     mc = FileUtils()
     allString = mc.concat("/Users/jy2947/Documents/eclipse-workspace/bime/Documents/python", "*.py")
     print allString
     pass
 def testTemplate(self):
     mc = FileUtils()
     s = mc.template_substitute("./my.template", this="summer", that="winter")
     print s
 def testBackup(self):
     print "testing..."
     mc = FileUtils()
     mc.backup("/Users/jy2947/Documents/eclipse-workspace/bime/Documents/python/amqp_consumer.py")
     pass