示例#1
0
 def test_6_errorMetadata(self):
     ''' test all in error '''
     for lid in _testvals('ipn'):
         try:
             meta = self.vdtr.metadata(lid)
             runChecks(meta, lid)
         except MetadataErrorException as mee:
             self.assertIsInstance(mee, MetadataErrorException)
             continue
         self.asserFalse(True, 'Expected MetadataErrorException')
示例#2
0
 def test_5_noneMetadata(self):
     ''' test error check on layers with missing fields '''
     for lid in _testvals('n'):
         try:
             meta = self.vdtr.metadata(lid)
             runChecks(meta, lid)
         except MetadataNoneException as mne:
             self.assertIsInstance(mne, MetadataNoneException)
             continue
         self.assertFalse(True, 'Expected MetadataNoneException')
示例#3
0
 def test_4_emptyMetadata(self):
     ''' test error check on layers with empty tags '''
     for lid in _testvals('e'):
         try:
             meta = self.vdtr.metadata(lid)
             runChecks(meta, lid)
         except MetadataEmptyException as mee:
             self.assertIsInstance(mee, MetadataEmptyException)
             continue
         self.assertFalse(True, 'Expected MetadataEmptyException')
示例#4
0
 def test_3_incorrectMetadata(self):
     ''' test error check on incorrect/invalid layers '''
     for lid in _testvals('i'):
         try:
             meta = self.vdtr.metadata(lid)
             runChecks(meta, lid)
         except MetadataIncorrectException as mie:
             self.assertIsInstance(mie, MetadataIncorrectException)
             continue
         self.assertFalse(True, 'Expected MetadataIncorrectException')
示例#5
0
 def test_2_correctAllMetadata(self):
     ''' test error check on correct layers '''
     try:
         print(os.getcwd())
         metafile = r'{}/testAllCorrect.xml'.format(os.getcwd())
         con = r'{}/testConfigAll.yaml'.format(os.getcwd())
         meta = self.vdtr.metadata(name=metafile)
         runChecks(meta, con=con)
     except Exception as e:
         self.assertFalse(True)
示例#6
0
 def test_8_invalidConfig(self):
     '''test config with invalid config option '''
     for lid in _testvals('c'):
         try:
             meta = self.vdtr.metadata(lid)
             file = r'{}/testConfigInvalid.yaml'.format(os.getcwd())
             runChecks(meta, lid=lid, con=file)
         except InvalidConfigException as ie:
             self.assertIsInstance(ie, InvalidConfigException)
             continue
         self.assertFalse(True, 'Expected InvalidConfigException')
示例#7
0
 def test_7_allOptionsConfig(self):
     ''' test config with all options at least True
         All 'correct' should show as None, as none have facsimile for metadata contact. '''
     for lid in _testvals('c'):
         try:
             meta = self.vdtr.metadata(lid)
             file = r'{}/testConfigAll.yaml'.format(os.getcwd())
             runChecks(meta, lid=lid, con=file)
         except MetadataNoneException as mne:
             self.assertIsInstance(mne, MetadataNoneException)
             continue
         self.assertFalse(True, 'Expected MetadataNoneException')