예제 #1
0
def test_create_archive():
  backups = DrupalBackups()
  backups.configfile = "./tests/drupalservers.json"
  assert backups.self_config()
  test_info = backups.create_archive(backups.servers[0])
  assert test_info['gathered']
  assert path.isfile(test_info['filepath'])
예제 #2
0
def test_configure():
  backups = DrupalBackups()
  assert not backups.self_config()
  backups.configfile = "./tests/drupalservers.json"
  assert backups.self_config()
  assert 'www.example.com' == backups.servers[0]['name']
  print "I RAN!"
예제 #3
0
def test_backup_ard():
  backups = DrupalBackups()
  backups.configfile = "./tests/drupalservers.json"
  assert backups.self_config()
  assert backups.backup_ard(backups.servers[0], backups.create_archive(backups.servers[0]))
예제 #4
0
def test_backup_all_now():
  backups = DrupalBackups()
  backups.configfile = "./tests/drupalservers.json"
  assert backups.self_config()
  assert backups.backup_all_now()