Skip to content

Commit d4365e1

Browse files
committed
Get tests passing again
1 parent 9b988c5 commit d4365e1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: graphene_sqlalchemy/tests/test_converter.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,24 @@ def test_should_postgresql_uuid_convert():
271271

272272
def test_should_postgresql_enum_convert():
273273
field = assert_column_conversion(
274-
postgresql.ENUM(enum.Enum("one", "two"), name="two_numbers"), graphene.Field
274+
postgresql.ENUM("one", "two", name="two_numbers"), graphene.Field
275275
)
276276
field_type = field.type()
277277
assert field_type.__class__.__name__ == "two_numbers"
278278
assert isinstance(field_type, graphene.Enum)
279279
assert hasattr(field_type, "two")
280280

281281

282+
def test_should_postgresql_py_enum_convert():
283+
field = assert_column_conversion(
284+
postgresql.ENUM(enum.Enum("TwoNumbers", "one two"), name="two_numbers"), graphene.Field
285+
)
286+
field_type = field.type()
287+
assert field_type.__class__.__name__ == "TwoNumbers"
288+
assert isinstance(field_type, graphene.Enum)
289+
assert hasattr(field_type, "two")
290+
291+
282292
def test_should_postgresql_array_convert():
283293
assert_column_conversion(postgresql.ARRAY(types.Integer), graphene.List)
284294

0 commit comments

Comments
 (0)