예제 #1
0
    def test_get_default_helper_set_returns_default_values(self):
        application = Application()
        application.set_auto_exit(False)
        application.set_catch_exceptions(False)

        helper_set = application.get_helper_set()

        self.assertTrue(helper_set.has('formatter'))
        self.assertTrue(helper_set.has('question'))
예제 #2
0
    def test_get_default_helper_set_returns_default_values(self):
        application = Application()
        application.set_auto_exit(False)
        application.set_catch_exceptions(False)

        helper_set = application.get_helper_set()

        self.assertTrue(helper_set.has("formatter"))
        self.assertTrue(helper_set.has("dialog"))
        self.assertTrue(helper_set.has("progress"))
예제 #3
0
    def test_adding_single_helper_set_overwrites_default_values(self):
        application = Application()
        application.set_auto_exit(False)
        application.set_catch_exceptions(False)

        application.set_helper_set(HelperSet([FormatterHelper()]))

        helper_set = application.get_helper_set()

        self.assertTrue(helper_set.has('formatter'))
        self.assertFalse(helper_set.has('question'))
예제 #4
0
    def test_adding_single_helper_set_overwrites_default_values(self):
        application = Application()
        application.set_auto_exit(False)
        application.set_catch_exceptions(False)

        application.set_helper_set(HelperSet({"formatter": FormatterHelper()}))

        helper_set = application.get_helper_set()

        self.assertTrue(helper_set.has("formatter"))
        self.assertFalse(helper_set.has("dialog"))
        self.assertFalse(helper_set.has("progress"))