# Path: app/__metadata__.py
# APP_NAME = 'LXDUI'
# APP_CLI_CMD = 'lxdui'
# VERSION = '2.2'
# GIT_URL = 'https://github.com/AdaptiveScale/lxdui.git'
# LXD_URL = 'http://localhost:8443'
# LICENSE = 'Apache 2.0'
# AUTHOR = 'AdaptiveScale, Inc.'
# AUTHOR_URL = 'http://www.adaptivescale.com'
# AUTHOR_EMAIL = 'info@adaptivescale.com'
# KEYWORDS = 'lxc lxc-containers lxd'
# IMAGE_HUB = 'http://hub.kuti.io'
# AUTO_LOAD_CONFIG = True
# DEFAULT_CONFIG_FORMAT = 'ini'


from app import __metadata__ as meta
import app.lib.conf as conf
import app.lib.log as logger
import os
import pathlib
import time
import configparser
import unittest
import logging

log = logging.getLogger(__name__)


class TestConfig(unittest.TestCase):

    @classmethod
    def setUp(cls):
        conf_file = '../conf/lxdui.conf'
        empty_file = '../conf/lxdui.conf.empty'

        # create the sample conf file
        file = pathlib.Path(conf_file)
        if not file.exists() or (file.exists() and file.stat() == 0 ):
            with open(conf_file, 'w') as f:

# Path: app/__metadata__.py
# APP_NAME = 'LXDUI'
# APP_CLI_CMD = 'lxdui'
# VERSION = '2.2'
# GIT_URL = 'https://github.com/AdaptiveScale/lxdui.git'
# LXD_URL = 'http://localhost:8443'
# LICENSE = 'Apache 2.0'
# AUTHOR = 'AdaptiveScale, Inc.'
# AUTHOR_URL = 'http://www.adaptivescale.com'
# AUTHOR_EMAIL = 'info@adaptivescale.com'
# KEYWORDS = 'lxc lxc-containers lxd'
# IMAGE_HUB = 'http://hub.kuti.io'
# AUTO_LOAD_CONFIG = True
# DEFAULT_CONFIG_FORMAT = 'ini'


# Path: tests/test_conf.py
from app import __metadata__ as meta
import app.lib.conf as conf
import app.lib.log as logger
import os
import pathlib
import time
import configparser
import unittest
import logging


log = logging.getLogger(__name__)


class TestConfig(unittest.TestCase):

    @classmethod
    def setUp(cls):
        conf_file = '../conf/lxdui.conf'
        empty_file = '../conf/lxdui.conf.empty'

        # create the sample conf file
        file = pathlib.Path(conf_file)
        if not file.exists() or (file.exists() and file.stat() == 0 ):
            with open(conf_file, 'w') as f:

                f.write(meta.__default_config__)