'``create_keypair`` sets secure permissions on
``id_rsa_flocker`` and ``id_rsa_flocker.pub``.'

def test_key_permissions(self):

    ssh_config = FilePath(self.mktemp())
    configurator = OpenSSHConfiguration(ssh_config_path=ssh_config, flocker_path=None)
    configurator.create_keypair()
    expected_private_key_permissions = Permissions(384)
    expected_public_key_permissions = Permissions(420)
    id_rsa = ssh_config.child('id_rsa_flocker')
    id_rsa_pub = ssh_config.child('id_rsa_flocker.pub')
    self.assertEqual((expected_private_key_permissions, expected_public_key_permissions), (id_rsa.getPermissions(), id_rsa_pub.getPermissions()))
