File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,28 @@ class SampleEnum(enum.Enum):
172
172
)
173
173
174
174
175
+ def test_convert_relationship_to_strawberry_type ():
176
+ strawberry_sqlalchemy_mapper = StrawberrySQLAlchemyMapper ()
177
+ _ , Department = _create_employee_and_department_tables ()
178
+ employees_property = Department .employees .property
179
+ assert (
180
+ strawberry_sqlalchemy_mapper ._convert_relationship_to_strawberry_type (
181
+ employees_property
182
+ ).__name__
183
+ == "EmployeeConnection"
184
+ )
185
+
186
+
187
+ def test_get_relationship_is_optional ():
188
+ strawberry_sqlalchemy_mapper = StrawberrySQLAlchemyMapper ()
189
+ _ , Department = _create_employee_and_department_tables ()
190
+ employees_property = Department .employees .property
191
+ assert (
192
+ strawberry_sqlalchemy_mapper ._get_relationship_is_optional (employees_property )
193
+ is True
194
+ )
195
+
196
+
175
197
def test_add_annotation ():
176
198
strawberry_sqlalchemy_mapper = StrawberrySQLAlchemyMapper ()
177
199
You can’t perform that action at this time.
0 commit comments