コード例 #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
ファイル: case.py プロジェクト: vicentealencar/pyfunct
    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()