mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-31 10:39:30 +00:00 
			
		
		
		
	 891ff4184d
			
		
	
	
		891ff4184d
		
			
		
	
	
	
	
		
			
			* Initial implementation for our Connection Class * Implement the Initial Connection class * Add Unit Tests * Fix Test * Fix Profile Test Connection * Remove unit test * Remove comment * Fix tests and missing changes
		
			
				
	
	
		
			23 lines
		
	
	
		
			963 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			963 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from metadata.ingestion.source.database.mysql.connection import MySQLConnection
 | |
| from metadata.ingestion.source.database.mysql.metadata import MysqlSource
 | |
| from metadata.profiler.interface.sqlalchemy.profiler_interface import (
 | |
|     SQAProfilerInterface,
 | |
| )
 | |
| from metadata.utils.importer import get_class_path
 | |
| from metadata.utils.service_spec import BaseSpec
 | |
| from metadata.utils.service_spec.default import DefaultDatabaseSpec
 | |
| 
 | |
| 
 | |
| def test_service_spec():
 | |
|     spec = BaseSpec(metadata_source_class=MysqlSource)
 | |
|     assert spec.metadata_source_class == get_class_path(MysqlSource)
 | |
| 
 | |
|     spec = DefaultDatabaseSpec(metadata_source_class=MysqlSource)
 | |
|     assert spec.metadata_source_class == get_class_path(MysqlSource)
 | |
|     assert spec.profiler_class == get_class_path(SQAProfilerInterface)
 | |
| 
 | |
|     spec = DefaultDatabaseSpec(
 | |
|         metadata_source_class=MysqlSource, connection_class=MySQLConnection
 | |
|     )
 | |
|     assert spec.connection_class == get_class_path(MySQLConnection)
 |