def test_get_op_version(self): ''' Test retrieving the glusterfs op-version ''' # Test with xml output structure from v3.7 mock_run = MagicMock(return_value=xml_op_version_37) with patch.dict(glusterfs.__salt__, {'cmd.run': mock_run}): self.assertEqual(glusterfs.get_op_version('test'), '30707') # Test with xml output structure from v3.12 mock_run = MagicMock(return_value=xml_op_version_312) with patch.dict(glusterfs.__salt__, {'cmd.run': mock_run}): self.assertEqual(glusterfs.get_op_version('test'), '30707')
def test_get_op_version(self): """ Test retrieving the glusterfs op-version """ # Test with xml output structure from v3.7 mock_run = MagicMock(return_value=xml_op_version_37) with patch.dict(glusterfs.__salt__, {"cmd.run": mock_run}): self.assertEqual(glusterfs.get_op_version("test"), "30707") # Test with xml output structure from v3.12 mock_run = MagicMock(return_value=xml_op_version_312) with patch.dict(glusterfs.__salt__, {"cmd.run": mock_run}): self.assertEqual(glusterfs.get_op_version("test"), "30707")