def test_01_create_token(self):

        db_token = Token(self.serial1, tokentype="remote")
        db_token.save()
        token = YubicoTokenClass(db_token)
        token.update(self.params1)
        token.set_pin(self.otppin)

        self.assertTrue(token.token.serial == self.serial1, token)
        self.assertTrue(token.token.tokentype == "yubico",
                        token.token.tokentype)
        self.assertTrue(token.type == "yubico", token)
        class_prefix = token.get_class_prefix()
        self.assertTrue(class_prefix == "UBCM", class_prefix)
        self.assertTrue(token.get_class_type() == "yubico", token)
Example #2
0
    def test_01_create_token(self):

        db_token = Token(self.serial1, tokentype="remote")
        db_token.save()
        token = YubicoTokenClass(db_token)
        token.update(self.params1)
        token.set_pin(self.otppin)

        self.assertTrue(token.token.serial == self.serial1, token)
        self.assertTrue(token.token.tokentype == "yubico",
                        token.token.tokentype)
        self.assertTrue(token.type == "yubico", token)
        class_prefix = token.get_class_prefix()
        self.assertTrue(class_prefix == "UBCM", class_prefix)
        self.assertTrue(token.get_class_type() == "yubico", token)