コード例 #1
0
    def test_getFactoryClassPassed(self):
        class FakeFactory(object):
            pass

        proxy = BaseProxy()
        factoryClass = proxy._getFactoryClass({"factoryClass": FakeFactory})
        self.assertEquals(factoryClass, FakeFactory)
コード例 #2
0
 def test_getFactoryClassDefault(self):
     proxy = BaseProxy()
     factoryClass = proxy._getFactoryClass({})
     self.assertEquals(factoryClass, None)
コード例 #3
0
 def test_getVersion1(self):
     proxy = BaseProxy()
     version = proxy._getVersion({"version": VERSION_1})
     self.assertEquals(version, VERSION_1)
コード例 #4
0
 def test_getVersionDefault(self):
     proxy = BaseProxy()
     version = proxy._getVersion({})
     self.assertEquals(version, VERSION_PRE1)
コード例 #5
0
 def test_creation(self):
     proxy = BaseProxy()
     self.assertEquals(proxy.version, VERSION_PRE1)
     self.assertEquals(proxy.factoryClass, None)