Skip to content

Commit 421f8e4

Browse files
authored
Fix deprecation warning in tests (#268)
Use sqlalchemy.types.LargeBinary instead of Binary
1 parent 3c3442e commit 421f8e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graphene_sqlalchemy/tests/test_converter.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ class Model(declarative_base()):
5050
def test_should_unknown_sqlalchemy_field_raise_exception():
5151
re_err = "Don't know how to convert the SQLAlchemy field"
5252
with pytest.raises(Exception, match=re_err):
53-
get_field(types.Binary())
53+
# support legacy Binary type and subsequent LargeBinary
54+
get_field(getattr(types, 'LargeBinary', types.Binary)())
5455

5556

5657
def test_should_date_convert_string():

0 commit comments

Comments
 (0)