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")
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')