class TestACDDCommon(unittest.TestCase): def setUp(self): self.acdd = ACDDBaseCheck() self.ds = Dataset(filename=os.devnull, mode='w', diskless=True) def tearDown(self): self.ds.close() def test_verify_geospatial_bounds(self): """Tests the geospatial_bounds function""" self.ds.geospatial_bounds = 'POLYGON ((40.26 -111.29, 41.26 -111.29, 41.26 -110.29, 40.26 -110.29, 40.26 -111.29))' # give arbitrary rating and check that things passed result = self.acdd.verify_geospatial_bounds(self.ds)(1) self.assertTrue(result.value) def test_verify_valid_title(self): self.ds.title = '@@@@@@@invalid@@@@@' def check_valid_date(self): self.ds.date_created = '2011-04-27T00:00:00Z' self.ds.date_created = '2011-04-27T00:00:00Z'
def setUp(self): self.acdd = ACDDBaseCheck() self.ds = Dataset(filename=os.devnull, mode='w', diskless=True)