本文整理汇总了Python中pyamf.tests.util.ClassCacheClearingTestCase.setUp方法的典型用法代码示例。如果您正苦于以下问题:Python ClassCacheClearingTestCase.setUp方法的具体用法?Python ClassCacheClearingTestCase.setUp怎么用?Python ClassCacheClearingTestCase.setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyamf.tests.util.ClassCacheClearingTestCase
的用法示例。
在下文中一共展示了ClassCacheClearingTestCase.setUp方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from pyamf.tests.util import ClassCacheClearingTestCase [as 别名]
# 或者: from pyamf.tests.util.ClassCacheClearingTestCase import setUp [as 别名]
def setUp(self):
ClassCacheClearingTestCase.setUp(self)
self.jessica = PetModel(name="Jessica", type="cat")
self.jessica.birthdate = datetime.date(1986, 10, 2)
self.jessica.weight_in_pounds = 5
self.jessica.spayed_or_neutered = False
示例2: setUp
# 需要导入模块: from pyamf.tests.util import ClassCacheClearingTestCase [as 别名]
# 或者: from pyamf.tests.util.ClassCacheClearingTestCase import setUp [as 别名]
def setUp(self):
ClassCacheClearingTestCase.setUp(self)
self.jessica = PetExpando(name='Jessica', type='cat')
self.jessica.birthdate = datetime.date(1986, 10, 2)
self.jessica.weight_in_pounds = 5
self.jessica.spayed_or_neutered = False
self.jessica.foo = 'bar'
示例3: setUp
# 需要导入模块: from pyamf.tests.util import ClassCacheClearingTestCase [as 别名]
# 或者: from pyamf.tests.util.ClassCacheClearingTestCase import setUp [as 别名]
def setUp(self):
ClassCacheClearingTestCase.setUp(self)
self.module = new.module('foo')
self.module.Classic = self.ClassicType
self.module.New = self.NewType
self.module.s = 'str'
self.module.i = 12323
self.module.f = 345.234
self.module.u = u'unicode'
self.module.l = ['list', 'of', 'junk']
self.module.d = {'foo': 'bar', 'baz': 'gak'}
self.module.obj = object()
self.module.mod = self.module
self.module.lam = lambda _: None
self.NewType.__module__ = 'foo'
self.ClassicType.__module__ = 'foo'
self.spam_module = Spam.__module__
Spam.__module__ = 'foo'
self.names = (self.module.__name__,)
示例4: setUp
# 需要导入模块: from pyamf.tests.util import ClassCacheClearingTestCase [as 别名]
# 或者: from pyamf.tests.util.ClassCacheClearingTestCase import setUp [as 别名]
def setUp(self):
ClassCacheClearingTestCase.setUp(self)
self.buf = util.BufferedByteStream()
self.decoder = amf0.Decoder(self.buf)
self.context = self.decoder.context
示例5: setUp
# 需要导入模块: from pyamf.tests.util import ClassCacheClearingTestCase [as 别名]
# 或者: from pyamf.tests.util.ClassCacheClearingTestCase import setUp [as 别名]
def setUp(self):
ClassCacheClearingTestCase.setUp(self)
DecoderMixIn.setUp(self)
示例6: setUp
# 需要导入模块: from pyamf.tests.util import ClassCacheClearingTestCase [as 别名]
# 或者: from pyamf.tests.util.ClassCacheClearingTestCase import setUp [as 别名]
def setUp(self):
ClassCacheClearingTestCase.setUp(self)
self.alias = pyamf.ClassAlias(Spam, defer=True)