예제 #1
0
    def test_actions_decorator(self):
        actions = Actions()

        @action
        def my_action():
            return 'MyAction'

        self.assertEqual(actions.my_action(), 'MyAction')
예제 #2
0
파일: case.py 프로젝트: andersonba/pyfunct
    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()