Beispiel #1
0
 def __init__(self, **data):
     """
     constructor of Supernode
     """
     Superclass.__init__(self, **data)
     BTreeContainer.__init__(self)
     for (name, value) in data.items():
         if name in ISupernode.names():
             setattr(self, name, value)
     self.ikRevision = __version__
Beispiel #2
0
 def __init__(self, title, **data):
     schooltool.requirement.requirement.Requirement.__init__(self, title)
     Superclass.__init__(self, ikName=title, **data)
     Superclass.__post_init__(self, **data)
     refAttributeNames = ['categories']
     for (name, value) in data.items():
         if name in IRequirement.names() and \
            name not in refAttributeNames:
             setattr(self, name, value)
     self.ikRevision = __version__
Beispiel #3
0
class SuperclassGeneralTestCase(PlacelessSetup, unittest.TestCase):
    def setUp(self):
        self.testobj = Superclass()
        super(SuperclassGeneralTestCase, self).setUp()

    def test_initial_values(self):
        self.assertEqual(self.testobj.ikName, u"")
        self.assertEqual(self.testobj.dbgLevel, NOTSET)
        self.assertEqual(self.testobj.ikComment, u"")
        self.assertEqual(self.testobj.ikAuthor, u"")
        self.assertEqual(self.testobj.ikNotes, [])
        self.assertEqual(self.testobj.history, [])

    def test_ObjectId(self):
        oid = self.testobj.getObjectId()
        self.assertTrue(oidIsValid(oid))

    def test_DcTitle(self):
        self.testobj.setDcTitle(u"testtitle")
        self.assertEqual(self.testobj.getDcTitle(), u"testtitle2")
Beispiel #4
0
 def setUp(self):
     self.testobj = Superclass()
     super(SuperclassGeneralTestCase, self).setUp()
Beispiel #5
0
 def __init__(self, **data):
     """
     constructor of the object
     """
     Superclass.__init__(self, **data)
     Folder.__init__(self)
Beispiel #6
0
 def __init__(self, requirement, scoreSystem, value, evaluator, **data):
     schooltool.requirement.evaluation.Evaluation.__init__(
         self, requirement, scoreSystem, value, evaluator)
     Superclass.__init__(self, ikName=requirement.ikName, **data)
     Superclass.__post_init__(self, **data)
Beispiel #7
0
 def __init__(self, title, **data):
     schooltool.requirement.requirement.Requirement.__init__(self, title)
     Superclass.__init__(self, ikName=title, **data)
     Superclass.__post_init__(self, **data)
Beispiel #8
0
 def __init__(self):
     Superclass.__init__(self)
     Contained.__init__(self)
     self.ikRevision = __version__
Beispiel #9
0
 def __init__(self):
     Superclass.__init__(self)
     OrderedContainer.__init__(self)
     self.ikRevision = __version__