Пример #1
0
    def test_keygen_keyfile(self, fpath):
        """
        test nacl.keygen function
        with keyfile set
        """
        with salt.utils.files.fopen(fpath, "w") as wfh:
            wfh.write(self.key)

        ret = nacl.keygen(keyfile=fpath)
        assert "saved pk_file: {}.pub".format(fpath) == ret
Пример #2
0
    def test_keygen_keyfile(self, fpath):
        '''
        test nacl.keygen function
        with keyfile set
        '''
        with salt.utils.files.fopen(fpath, 'w') as wfh:
            wfh.write(self.key)

        ret = nacl.keygen(keyfile=fpath)
        assert 'saved pk_file: {}.pub'.format(fpath) == ret
Пример #3
0
 def test_keygen(self):
     """
     test nacl.keygen function
     """
     ret = nacl.keygen()
     assert all(key in ret for key in ret.keys())
Пример #4
0
 def test_keygen(self):
     '''
     test nacl.keygen function
     '''
     ret = nacl.keygen()
     assert all(key in ret for key in ret.keys())