def test_class_info(self): """ Test the classmethod getClassInfo """ from linotp.tokens.yubikeytoken import YubikeyTokenClass full_class_info = { 'selfservice': {}, 'description': 'Yubico token to run the AES OTP mode.', 'title': 'YubiKey in Yubico Mode', 'type': 'yubikey', 'init': {}, 'policy': {}, 'config': {} } class_info = YubikeyTokenClass.getClassInfo() assert full_class_info == class_info assert "YubiKey in Yubico Mode" == \ YubikeyTokenClass.getClassInfo(key='title') assert full_class_info == \ YubikeyTokenClass.getClassInfo(key='some_non_existent_key') assert "some_random_value" == \ YubikeyTokenClass.getClassInfo( key="some_non_existent_key", ret="some_random_value" )
def test_class_info(self): """ Test the classmethod getClassInfo """ from linotp.tokens.yubikeytoken import YubikeyTokenClass full_class_info = { 'selfservice': {}, 'description': 'Yubico token to run the AES OTP mode.', 'title': 'YubiKey in Yubico Mode', 'type': 'yubikey', 'init': {}, 'policy': {}, 'config': {} } class_info = YubikeyTokenClass.getClassInfo() self.assertEquals(full_class_info, class_info) self.assertEquals( "YubiKey in Yubico Mode", YubikeyTokenClass.getClassInfo(key='title') ) self.assertEquals( full_class_info, YubikeyTokenClass.getClassInfo(key='some_non_existent_key') ) self.assertEquals( "some_random_value", YubikeyTokenClass.getClassInfo( key="some_non_existent_key", ret="some_random_value" ) )
def test_class_info(self): """ Test the classmethod getClassInfo """ from linotp.tokens.yubikeytoken import YubikeyTokenClass full_class_info = { "selfservice": {}, "description": "Yubico token to run the AES OTP mode.", "title": "YubiKey in Yubico Mode", "type": "yubikey", "init": {}, "policy": {}, "config": {}, } class_info = YubikeyTokenClass.getClassInfo() assert full_class_info == class_info assert "YubiKey in Yubico Mode" == YubikeyTokenClass.getClassInfo( key="title") assert full_class_info == YubikeyTokenClass.getClassInfo( key="some_non_existent_key") assert "some_random_value" == YubikeyTokenClass.getClassInfo( key="some_non_existent_key", ret="some_random_value")