<s> from testtools import TestCase <EOL> from kmip . pie . objects import ManagedObject <EOL> class DummyManagedObject ( ManagedObject ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , object_type = None ) : <EOL> """<STR_LIT>""" <EOL> super ( DummyManagedObject , self ) . __init__ ( ) <EOL> self . _object_type = object_type <EOL> def validate ( self ) : <EOL> super ( DummyManagedObject , self ) . validate ( ) <EOL> return <EOL> def __repr__ ( self ) : <EOL> super ( DummyManagedObject , self ) . __repr__ ( ) <EOL> return '<STR_LIT>' <EOL> def __str__ ( self ) : <EOL> super ( DummyManagedObject , self ) . __str__ ( ) <EOL> return '<STR_LIT>' <EOL> def __eq__ ( self , other ) : <EOL> super ( DummyManagedObject , self ) . __eq__ ( other ) <EOL> return True <EOL> def __ne__ ( self , other ) : <EOL> super ( DummyManagedObject , self ) . __ne__ ( other ) <EOL> return False <EOL> class TestManagedObject ( TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> super ( TestManagedObject , self ) . setUp ( ) <EOL> def tearDown ( self ) : <EOL> super ( TestManagedObject , self ) . tearDown ( ) <EOL> def test_init ( self ) : <EOL> """<STR_LIT>""" <EOL> DummyManagedObject ( ) <EOL> def test_get_object_type ( self ) : <EOL> """<STR_LIT>""" <EOL> expected = '<STR_LIT>' <EOL> dummy = DummyManagedObject ( expected ) <EOL> observed = dummy . object_type <EOL> self . assertEqual ( expected , observed ) <EOL> def test_set_object_type ( self ) : <EOL> """<STR_LIT>""" <EOL> dummy = DummyManagedObject ( ) <EOL> def set_object_type ( ) : <EOL> dummy . object_type = '<STR_LIT>' <EOL> self . assertRaises ( AttributeError , set_object_type ) <EOL> def test_validate ( self ) : <EOL> """<STR_LIT>""" <EOL> dummy = DummyManagedObject ( ) <EOL> dummy . validate ( ) <EOL> def test_repr ( self ) : <EOL> """<STR_LIT>""" <EOL> dummy = DummyManagedObject ( ) <EOL> repr ( dummy ) <EOL> def test_str ( self ) : <EOL> """<STR_LIT>""" <EOL> dummy = DummyManagedObject ( ) <EOL> str ( dummy ) <EOL> def test_eq ( self ) : <EOL> """<STR_LIT>""" <EOL> dummy = DummyManagedObject ( ) <EOL> self . assertTrue ( dummy == dummy ) <EOL> def test_ne ( self ) : <EOL> """<STR_LIT>""" <EOL> dummy = DummyManagedObject ( ) <EOL> self . assertFalse ( dummy != dummy ) </s>
