<s> """<STR_LIT>""" <EOL> import unittest <EOL> from mbed_host_tests . host_tests_registry import HostRegistry <EOL> from mbed_host_tests import BaseHostTest <EOL> class HostRegistryTestCase ( unittest . TestCase ) : <EOL> class HostTestClassMock ( BaseHostTest ) : <EOL> def setup ( self ) : <EOL> pass <EOL> def result ( self ) : <EOL> pass <EOL> def teardown ( self ) : <EOL> pass <EOL> def setUp ( self ) : <EOL> self . HOSTREGISTRY = HostRegistry ( ) <EOL> def tearDown ( self ) : <EOL> pass <EOL> def test_register_host_test ( self ) : <EOL> self . HOSTREGISTRY . register_host_test ( '<STR_LIT>' , self . HostTestClassMock ( ) ) <EOL> self . assertEqual ( True , self . HOSTREGISTRY . is_host_test ( '<STR_LIT>' ) ) <EOL> def test_unregister_host_test ( self ) : <EOL> self . HOSTREGISTRY . register_host_test ( '<STR_LIT>' , self . HostTestClassMock ( ) ) <EOL> self . assertEqual ( True , self . HOSTREGISTRY . is_host_test ( '<STR_LIT>' ) ) <EOL> self . assertNotEqual ( None , self . HOSTREGISTRY . get_host_test ( '<STR_LIT>' ) ) <EOL> self . HOSTREGISTRY . unregister_host_test ( '<STR_LIT>' ) <EOL> self . assertEqual ( False , self . HOSTREGISTRY . is_host_test ( '<STR_LIT>' ) ) <EOL> def test_get_host_test ( self ) : <EOL> self . HOSTREGISTRY . register_host_test ( '<STR_LIT>' , self . HostTestClassMock ( ) ) <EOL> self . assertEqual ( True , self . HOSTREGISTRY . is_host_test ( '<STR_LIT>' ) ) <EOL> self . assertNotEqual ( None , self . HOSTREGISTRY . get_host_test ( '<STR_LIT>' ) ) <EOL> def test_is_host_test ( self ) : <EOL> self . assertEqual ( False , self . HOSTREGISTRY . is_host_test ( '<STR_LIT>' ) ) <EOL> self . assertEqual ( False , self . HOSTREGISTRY . is_host_test ( None ) ) <EOL> self . assertEqual ( False , self . HOSTREGISTRY . is_host_test ( '<STR_LIT>' ) ) <EOL> def test_host_test_str_not_empty ( self ) : <EOL> for ht_name in self . HOSTREGISTRY . HOST_TESTS : <EOL> ht = self . HOSTREGISTRY . HOST_TESTS [ ht_name ] <EOL> self . assertNotEqual ( None , ht ) <EOL> def test_host_test_has_name_attribute ( self ) : <EOL> for ht_name in self . HOSTREGISTRY . HOST_TESTS : <EOL> ht = self . HOSTREGISTRY . HOST_TESTS [ ht_name ] <EOL> self . assertTrue ( hasattr ( ht , '<STR_LIT>' ) ) <EOL> self . assertTrue ( hasattr ( ht , '<STR_LIT:result>' ) ) <EOL> self . assertTrue ( hasattr ( ht , '<STR_LIT>' ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
