aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Dan <dan@rcoh-ubuntu-small.(none)>2011-01-28 10:11:22 -0500
committerGravatar Dan <dan@rcoh-ubuntu-small.(none)>2011-01-28 10:11:22 -0500
commita028c880c8325419a238667e71a7e919b72a4798 (patch)
tree5a07f674fcead141165a5b4fec0143c3e6c60e05 /tests
parentb8bb5e82a2e8802b9adb1258463d4198f974dbd1 (diff)
parent3319a58ecc391f9aac092ade45f9f50dc2af5aa6 (diff)
Merge branch 'fridaydemo' of github.com:rcoh/SmootLight into osc
Diffstat (limited to 'tests')
-rw-r--r--tests/TestComponentRegistry.py3
-rw-r--r--tests/TestConfigLoaders.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/TestComponentRegistry.py b/tests/TestComponentRegistry.py
index 5ada524..9de1a32 100644
--- a/tests/TestComponentRegistry.py
+++ b/tests/TestComponentRegistry.py
@@ -4,13 +4,16 @@ from operationscore.SmootCoreObject import SmootCoreObject
class TestComponentRegistry(unittest.TestCase):
def setUp(self):
compReg.initRegistry()
+
def tearDown(self):
compReg.clearRegistry()
+
def test_register_component_id_specified(self):
comp = SmootCoreObject({'Id': 'obj1'})
compReg.registerComponent(comp)
newcomp = compReg.getComponent('obj1')
assert comp == newcomp
+
def test_register_new_id(self):
comp = SmootCoreObject({})
cid =compReg.registerComponent(comp)
diff --git a/tests/TestConfigLoaders.py b/tests/TestConfigLoaders.py
index 17fc2d9..c79bbf1 100644
--- a/tests/TestConfigLoaders.py
+++ b/tests/TestConfigLoaders.py
@@ -7,8 +7,10 @@ import xml
class TestConfigLoaders(unittest.TestCase):
def setUp(self):
pass
+
def tearDown(self):
pass
+
def test_composite(self):
parent = ElementTree()
overrider = ElementTree()
@@ -20,6 +22,7 @@ class TestConfigLoaders(unittest.TestCase):
result = ElementTree(result)
result.write('tests/testdata/compositeTESTout.xml')
assert filecmp.cmp('tests/testdata/compositeTESTout.xml','tests/testdata/compositeTRUTH.xml')
+
def test_inheritance(self):
result = Config.loadConfigFile('tests/testdata/inheritanceTEST.xml')