コード例 #1
0
ファイル: helpers.py プロジェクト: cjw296/python-workfront
 def setUp(self):
     super(TestObjectHelper, self).setUp()
     self.replace('workfront.session.Session.version_registry', {})
     test_api = APIVersion('test')
     class TestObject(Object):
         code='TEST'
         field_one = Field('fieldOne')
         field_two = Field('fieldTwo')
     test_api.register(TestObject)
     Session.register(test_api)
     self.session = Session('test', api_version='test')
     self.api = self.session.api
コード例 #2
0
    def setUp(self):
        super(TestObjectHelper, self).setUp()
        self.replace('workfront.session.Session.version_registry', {})
        test_api = APIVersion('test')

        class TestObject(Object):
            code = 'TEST'
            field_one = Field('fieldOne')
            field_two = Field('fieldTwo')

        test_api.register(TestObject)
        Session.register(test_api)
        self.session = Session('test', api_version='test')
        self.api = self.session.api