From 0cad6dc96afc2ebd4d03beb14ed01bc155dfa322 Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 06 Apr 2009 02:38:10 +0000 Subject: LP 348570 Core : Extending actions with the new properties, adding min / max size to arrays --- (limited to 'src/sugar/tutorius/tests/actiontests.py') diff --git a/src/sugar/tutorius/tests/actiontests.py b/src/sugar/tutorius/tests/actiontests.py index d1de5fd..cfb6114 100644 --- a/src/sugar/tutorius/tests/actiontests.py +++ b/src/sugar/tutorius/tests/actiontests.py @@ -29,15 +29,7 @@ from sugar.tutorius.services import ObjectStore class PropertyAction(Action): def __init__(self, na): - self._a = na - - def set_a(self, na): - self._a = na - - def get_a(self): - return self._a - - a = property(fget=get_a, fset=set_a) + self.a = TIntProperty(na) def has_function(obj, function_name): """ @@ -54,6 +46,7 @@ class PropsTest(unittest.TestCase): assert prop.get_properties() == ['a'], "Action does not contain property 'a'" +class OnceWrapperTest(unittest.TestCase): def validate_wrapper(self, wrapper_instance): """ Ensures that a given instance of a wrapper implements the Action @@ -67,7 +60,7 @@ class PropsTest(unittest.TestCase): assert has_function(wrapper_instance, "get_properties"),\ "The wrapper does not have the 'get_properties' function." - + def test_once_wrapper_interface(self): """ Tests that the interface of the OnceWrapper actually conforms to the of -- cgit v0.9.1