Example #1
0
 def test_read_var_name(self):
     """Test var_name."""
     info = CoordinateInfo('var')
     info.read_json({'var_name': self.value})
     self.assertEqual(info.var_name, self.value)
Example #2
0
 def test_read_empty_dictionary(self):
     """Test empty dict."""
     info = CoordinateInfo('var')
     info.read_json({})
     self.assertEqual('', info.standard_name)
Example #3
0
 def test_constructor(self):
     """Test constructor."""
     info = CoordinateInfo('var')
     self.assertEqual('var', info.name)
Example #4
0
 def test_read_requested(self):
     """Test requested."""
     value = ['value1', 'value2']
     info = CoordinateInfo('var')
     info.read_json({'requested': value})
     self.assertEqual(info.requested, value)
Example #5
0
 def test_read_valid_max(self):
     """Test valid_max."""
     info = CoordinateInfo('var')
     info.read_json({'valid_max': self.value})
     self.assertEqual(info.valid_max, self.value)
Example #6
0
 def test_read_units(self):
     """Test units."""
     info = CoordinateInfo('var')
     info.read_json({'units': self.value})
     self.assertEqual(info.units, self.value)