예제 #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)
예제 #2
0
 def test_read_empty_dictionary(self):
     """Test empty dict."""
     info = CoordinateInfo('var')
     info.read_json({})
     self.assertEqual('', info.standard_name)
예제 #3
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)
예제 #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)
예제 #5
0
 def test_read_units(self):
     """Test units."""
     info = CoordinateInfo('var')
     info.read_json({'units': self.value})
     self.assertEqual(info.units, self.value)