Skip to content

Commit

Permalink
assert sql for sqlalchemy 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jnak committed Jan 3, 2020
1 parent 8959585 commit 0c2b67b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions graphene_sqlalchemy/tests/test_batching.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ def test_many_to_one(session_factory):
# The batched SQL statement generated is different in 1.2.x
# SQLAlchemy 1.3+ optimizes out a JOIN statement in `selectin`
# See https://git.io/JewQu
sql_statements = [message for message in messages if 'SELECT' in message and ' FROM articles']
assert len(sql_statements) == 2
return

assert messages == [
Expand Down Expand Up @@ -214,6 +216,8 @@ def test_one_to_one(session_factory):
# The batched SQL statement generated is different in 1.2.x
# SQLAlchemy 1.3+ optimizes out a JOIN statement in `selectin`
# See https://git.io/JewQu
sql_statements = [message for message in messages if 'SELECT' in message and ' FROM articles']
assert len(sql_statements) == 2
return

assert messages == [
Expand Down Expand Up @@ -316,6 +320,8 @@ def test_one_to_many(session_factory):
# The batched SQL statement generated is different in 1.2.x
# SQLAlchemy 1.3+ optimizes out a JOIN statement in `selectin`
# See https://git.io/JewQu
sql_statements = [message for message in messages if 'SELECT' in message and ' FROM articles']
assert len(sql_statements) == 2
return

assert messages == [
Expand Down Expand Up @@ -442,6 +448,8 @@ def test_many_to_many(session_factory):
# The batched SQL statement generated is different in 1.2.x
# SQLAlchemy 1.3+ optimizes out a JOIN statement in `selectin`
# See https://git.io/JewQu
sql_statements = [message for message in messages if 'SELECT' in message and ' FROM pets']
assert len(sql_statements) == 2
return

assert messages == [
Expand Down

0 comments on commit 0c2b67b

Please sign in to comment.