def test_streams_outputs_records(self, catalog_path, stream_config): configured_catalog = ConfiguredAirbyteCatalog.parse_file(catalog_path) records, states = self._read_records(stream_config, configured_catalog) assert records, "should have some records returned" if configured_catalog.streams[0].sync_mode == SyncMode.incremental: assert states, "should have some states returned"
def configured_catalog() -> ConfiguredAirbyteCatalog: catalog_filename = HERE.parent / "sample_files" / "configured_catalog.json" if not catalog_filename.exists(): raise RuntimeError( f"Please provide configured catalog in {catalog_filename}") return ConfiguredAirbyteCatalog.parse_file(catalog_filename)
def configured_catalog_fixture(): return ConfiguredAirbyteCatalog.parse_file( "sample_files/configured_catalog.json")
def configured_catalog_fixture( configured_catalog_path) -> Optional[ConfiguredAirbyteCatalog]: if configured_catalog_path: return ConfiguredAirbyteCatalog.parse_file(configured_catalog_path) return None
def configured_catalog_fixture(): return ConfiguredAirbyteCatalog.parse_file( BASE_DIRECTORY / "sample_files/configured_catalog_activities_overview.json")