Ejemplo n.º 1
0
    def test_run_2(self):
        """tear down test.
        """
        options = TestOptions()
        options.test_6()

        console = Console()
        console._parser = mock.Mock()
        console._parser.parse_args = mock.Mock()
        console._parser.parse_args.return_value = (options, None)

        check1 = console.prepare()
        check2 = console.run()

        self.assertTrue(check1)
        self.assertTrue(check2)
        return
Ejemplo n.º 2
0
#    limitations under the License.
#
#    Copyright (C) 2017, Kai Raphahn <*****@*****.**>
#

import sys
import easyb

from easyb.console import Console

if __name__ == '__main__':

    easyb.log.file_name = "easyb-tool.log"
    check = easyb.conf.load("config.json")
    if check is False:
        easyb.log.error("Unable to load config!")
        sys.exit(1)

    main = Console()

    if main.prepare() is False:
        sys.exit(1)

    if main.run() is False:
        sys.exit(1)

    if main.close() is False:
        sys.exit(1)

    sys.exit(0)