Beispiel #1
0
    def test_04_get_sshkey(self):
        db_token = Token.query.filter(Token.serial == self.serial1).first()
        token = SSHkeyTokenClass(db_token)
        sshkey = token.get_sshkey()
        self.assertTrue(sshkey == self.sshkey, sshkey)
        self.assertIsInstance(sshkey, six.text_type)

        db_token = Token.query.filter(Token.serial == self.serial2).first()
        token = SSHkeyTokenClass(db_token)
        sshkey = token.get_sshkey()
        self.assertTrue(sshkey == self.sshkey_ecdsa, sshkey)
        self.assertIsInstance(sshkey, six.text_type)

        db_token = Token.query.filter(Token.serial == self.serial3).first()
        token = SSHkeyTokenClass(db_token)
        sshkey = token.get_sshkey()
        self.assertTrue(sshkey == self.sshkey_ed25519, sshkey)
        self.assertIsInstance(sshkey, six.text_type)
 def test_04_get_sshkey(self):
     db_token = Token.query.filter(Token.serial == self.serial1).first()
     token = SSHkeyTokenClass(db_token)
     sshkey = token.get_sshkey()
     self.assertTrue(sshkey == self.sshkey, sshkey)
 def test_04_get_sshkey(self):
     db_token = Token.query.filter(Token.serial == self.serial1).first()
     token = SSHkeyTokenClass(db_token)
     sshkey = token.get_sshkey()
     self.assertTrue(sshkey == self.sshkey, sshkey)