# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals

import salt.utils.platform
from tests.support.case import SSHCase
from tests.support.helpers import slowTest
from tests.support.unit import skipIf


@skipIf(salt.utils.platform.is_windows(), "salt-ssh not available on Windows")
class SSHGrainsTest(SSHCase):
    """
    testing grains with salt-ssh
    """

    @slowTest
    def test_grains_items(self):
        """
        test grains.items with salt-ssh
        """
        ret = self.run_function("grains.items")
        grain = "Linux"
        if salt.utils.platform.is_darwin():
            grain = "Darwin"
        if salt.utils.platform.is_aix():
            grain = "AIX"
        self.assertEqual(ret["kernel"], grain)
        self.assertTrue(isinstance(ret, dict))

@@ -1,102 +1,4 @@
-# -*- coding: utf-8 -*-%0Afrom __future__ import absolute_import, print_function, unicode_literals%0A%0A
 impo
@@ -460,16 +460,64 @@
 items%22)%0A
+        if salt.utils.platform.is_darwin():%0A    
         
@@ -529,13 +529,14 @@
  = %22
-Linux
+Darwin
 %22%0A  
@@ -533,32 +533,34 @@
 Darwin%22%0A        
+el
 if salt.utils.pl
@@ -561,38 +561,35 @@
 ils.platform.is_
-darwin
+aix
 ():%0A            
@@ -589,38 +589,35 @@
        grain = %22
-Darwin
+AIX
 %22%0A        if sal
@@ -602,32 +602,34 @@
 = %22AIX%22%0A        
+el
 if salt.utils.pl
@@ -630,37 +630,85 @@
 ils.platform.is_
-aix()
+freebsd():%0A            grain = %22FreeBSD%22%0A        else
 :%0A            gr
@@ -706,35 +706,37 @@
        grain = %22
-AIX
+Linux
 %22%0A        self.a

Fix `integration.ssh.test_grains.SSHGrainsTest.test_grains_items` on FreeBSD