class TestSftof(unittest.TestCase): """Test sftof fixes.""" def setUp(self): """Prepare tests.""" self.cube = Cube([1.0], var_name='sftof', units='J') self.fix = Sftof() def test_get(self): """Test fix get""" self.assertListEqual(Fix.get_fixes('CMIP5', 'MIROC5', 'sftof'), [Sftof()]) def test_fix_data(self): """Test data fix.""" cube = self.fix.fix_data(self.cube) self.assertEqual(cube.data[0], 100) self.assertEqual(cube.units, Unit('J'))
def test_get(self): """Test fix get""" self.assertListEqual(Fix.get_fixes('CMIP5', 'MIROC5', 'sftof'), [Sftof()])
def setUp(self): """Prepare tests.""" self.cube = Cube([1.0], var_name='sftof', units='J') self.fix = Sftof()