def test_relclasses(self): """Test geodatabase report for relationship classes.""" test_name = self.id().split('.')[-1] self.reporter = registrant.Reporter( gdb_path=self.in_gdb, out_report_folder_path=os.path.join(self.out_report_folder, test_name + PYTHON_VERSION), ) self.reporter.gdb2html( do_report_versions=False, do_report_replicas=False, do_report_domains=False, do_report_domains_coded_values=False, do_report_relclasses=True, do_report_tables=False, do_report_tables_fields=False, do_report_tables_subtypes=False, do_report_tables_indexes=False, do_report_fcs=False, do_report_fcs_fields=False, do_report_fcs_subtypes=False, do_report_fcs_indexes=False, ) print(self.reporter.report_file_path) self.assertEqual( html_parsers.parse_relclasses_from_html( html_file=self.reporter.report_file_path, json_file=self.json_results, ), (True, True)) return
def test_personal_gdb(self): """Test that report personal geodatabase with ogr is not supported.""" test_name = self.id().split('.')[-1] with self.assertRaises(ValueError): reporter = registrant.Reporter( gdb_path='personal.mdb', out_report_folder_path=os.path.join( self.out_report_folder, test_name + PYTHON_VERSION, ), ) return
def test_fcs(self): """Test geodatabase report for feature classes.""" test_name = self.id().split('.')[-1] self.reporter = registrant.Reporter( gdb_path=self.in_gdb, out_report_folder_path=os.path.join(self.out_report_folder, test_name + PYTHON_VERSION), ) self.reporter.fcs2html() print(self.reporter.report_file_path) self.assertEqual( html_parsers.parse_fcs_from_html( html_file=self.reporter.report_file_path, json_file=self.json_results, ), (True, True))