def test_get_x(self):
     """
     Test if it get current X keyboard setting
     """
     mock = MagicMock(return_value="layout:     us")
     with patch.dict(keyboard.__salt__, {"cmd.run": mock}):
         self.assertEqual(keyboard.get_x(), "us")
Exemple #2
0
 def test_get_x(self):
     '''
     Test if it get current X keyboard setting
     '''
     mock = MagicMock(return_value='layout:     us')
     with patch.dict(keyboard.__salt__, {'cmd.run': mock}):
         self.assertEqual(keyboard.get_x(), 'us')
Exemple #3
0
 def test_get_x(self):
     """
     Test if it get current X keyboard setting
     """
     mock = MagicMock(return_value="layout:     us")
     with patch.dict(keyboard.__salt__, {"cmd.run": mock}):
         self.assertEqual(keyboard.get_x(), "us")