File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,6 @@ def py_test_mark_sync(f):
17
17
return f # no-op decorator
18
18
19
19
20
- @pytest .fixture (scope = "session" )
21
- def event_loop (request ):
22
- loop = asyncio .get_event_loop_policy ().new_event_loop ()
23
- yield loop
24
- loop .close ()
25
-
26
-
27
20
@pytest .fixture (scope = "session" )
28
21
def redis ():
29
22
yield get_redis_connection ()
Original file line number Diff line number Diff line change @@ -1134,7 +1134,7 @@ class TestUpdatesClass(JsonModel, index=True):
1134
1134
@py_test_mark_asyncio
1135
1135
async def test_model_with_dict ():
1136
1136
class EmbeddedJsonModelWithDict (EmbeddedJsonModel , index = True ):
1137
- dict : Dict
1137
+ dict_field : Dict
1138
1138
1139
1139
class ModelWithDict (JsonModel , index = True ):
1140
1140
embedded_model : EmbeddedJsonModelWithDict
@@ -1145,14 +1145,14 @@ class ModelWithDict(JsonModel, index=True):
1145
1145
inner_dict = dict ()
1146
1146
d ["foo" ] = "bar"
1147
1147
inner_dict ["bar" ] = "foo"
1148
- embedded_model = EmbeddedJsonModelWithDict (dict = inner_dict )
1148
+ embedded_model = EmbeddedJsonModelWithDict (dict_field = inner_dict )
1149
1149
item = ModelWithDict (info = d , embedded_model = embedded_model )
1150
1150
await item .save ()
1151
1151
1152
1152
rematerialized = await ModelWithDict .find (ModelWithDict .pk == item .pk ).first ()
1153
1153
assert rematerialized .pk == item .pk
1154
1154
assert rematerialized .info ["foo" ] == "bar"
1155
- assert rematerialized .embedded_model .dict ["bar" ] == "foo"
1155
+ assert rematerialized .embedded_model .dict_field ["bar" ] == "foo"
1156
1156
1157
1157
1158
1158
@py_test_mark_asyncio
You can’t perform that action at this time.
0 commit comments