示例#1
0
    def test_actions_decorator(self):
        actions = Actions()

        @action
        def my_action():
            return 'MyAction'

        self.assertEqual(actions.my_action(), 'MyAction')
示例#2
0
    def __init__(self, *args, **kwargs):
        self.__class__.browsers = []
        self.__class__.browser = None

        super(FunctTestCase, self).__init__(*args, **kwargs)

        # Makes all actions registered with `@action` accessible by
        # `self.actions` attribute.
        self.actions = Actions()
示例#3
0
    def __init__(self, *args, **kwargs):
        super(FunctTestCase, self).__init__(*args, **kwargs)

        # List of browsers to be quitted in tear down.
        self.browsers = []

        # Makes all actions registered with `@action` accessible by
        # `self.actions` attribute.
        self.actions = Actions()
示例#4
0
 def test_undefined_action_raises_AttributeError(self):
     with self.assertRaises(AttributeError):
         actions = Actions()
         actions.undefined_action()