'Test restore_config_zip'

def test_restore_config_zip(self):

    here = os.path.dirname(__file__)
    files = [f for f in os.listdir(here) if (f[(-3):] in ['.db', '.py'])]
    zip_path = os.path.join(here, '_restore_test.zip')
    helpers.backup_config_zip(files, zip_path, here)
    restore_container = os.path.join(here, '_restore_tests')
    os.mkdir(restore_container)
    restore_path = os.path.join(restore_container, 'test')
    self.assertFalse(helpers.restore_config_zip(os.path.abspath(files[1]), restore_path))
    self.assertTrue(helpers.restore_config_zip(zip_path, restore_path))
    self.assertTrue(helpers.restore_config_zip(zip_path, restore_path))
    if os.path.isfile(zip_path):
        os.remove(zip_path)
    if os.path.isdir(restore_container):
        rmtree(restore_container)
