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')
Esempio n. 2
0
 def testWriteWithTemplate(self):
     mc = FileUtils()
     mc.write_with_template("/tmp/t.me", "./my.template", this="summer", that="winter")
Esempio n. 3
0
 def testConcat(self):
     print "testing!"
     mc = FileUtils()
     allString = mc.concat("/Users/jy2947/Documents/eclipse-workspace/bime/Documents/python", "*.py")
     print allString
     pass
Esempio n. 4
0
 def testTemplate(self):
     mc = FileUtils()
     s = mc.template_substitute("./my.template", this="summer", that="winter")
     print s
Esempio n. 5
0
 def testBackup(self):
     print "testing..."
     mc = FileUtils()
     mc.backup("/Users/jy2947/Documents/eclipse-workspace/bime/Documents/python/amqp_consumer.py")
     pass