mirror of
				https://github.com/fastapi/sqlmodel.git
				synced 2025-11-01 02:43:22 +08:00 
			
		
		
		
	⬆️ Upgrade support for SQLAlchemy 1.4.49, update tests (#519)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -26,8 +26,18 @@ def test_tutorial(clear_sqlmodel): | ||||
|     insp: Inspector = inspect(mod.engine) | ||||
|     indexes = insp.get_indexes(str(mod.Hero.__tablename__)) | ||||
|     expected_indexes = [ | ||||
|         {"name": "ix_hero_name", "column_names": ["name"], "unique": 0}, | ||||
|         {"name": "ix_hero_age", "column_names": ["age"], "unique": 0}, | ||||
|         { | ||||
|             "name": "ix_hero_name", | ||||
|             "dialect_options": {}, | ||||
|             "column_names": ["name"], | ||||
|             "unique": 0, | ||||
|         }, | ||||
|         { | ||||
|             "name": "ix_hero_age", | ||||
|             "dialect_options": {}, | ||||
|             "column_names": ["age"], | ||||
|             "unique": 0, | ||||
|         }, | ||||
|     ] | ||||
|     for index in expected_indexes: | ||||
|         assert index in indexes, "This expected index should be in the indexes in DB" | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Sandro Tosi
					Sandro Tosi