FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

⬆️ Upgrade support for SQLAlchemy 1.4.49, update tests by sandrotosi · Pull Request #519 · fastapi/sqlmodel · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (4) .toml  (1) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ classifiers = [

[tool.poetry.dependencies]
python = "^3.7"
SQLAlchemy = ">=1.4.29,<=1.4.41"
SQLAlchemy = ">=1.4.29,<2.0.0"
pydantic = "^1.8.2"
sqlalchemy2-stubs = {version = "*", allow-prereleases = true}

Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,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"
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,18 @@ def test_tutorial(clear_sqlmodel):
insp: Inspector = inspect(mod.engine)
indexes = insp.get_indexes(str(mod.Hero.__tablename__))
expected_indexes = [
{"name": "ix_hero_age", "column_names": ["age"], "unique": 0},
{"name": "ix_hero_name", "column_names": ["name"], "unique": 0},
{
"name": "ix_hero_age",
"dialect_options": {},
"column_names": ["age"],
"unique": 0,
},
{
"name": "ix_hero_name",
"dialect_options": {},
"column_names": ["name"],
"unique": 0,
},
]
for index in expected_indexes:
assert index in indexes, "This expected index should be in the indexes in DB"
Expand Down
14 changes: 12 additions & 2 deletions tests/test_tutorial/test_indexes/test_tutorial001.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,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"
Expand Down
14 changes: 12 additions & 2 deletions tests/test_tutorial/test_indexes/test_tutorial006.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

Back | FazBrowse Home | New Git URL