Skip to content

Commit abdddad

Browse files
committed
fixup! Simplify ContextLocalState API
1 parent 7ab3310 commit abdddad

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/test_context.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ def test_state_is_stored_separately_per_async_context():
9191
assert client1.feature_flags == []
9292
assert client2.feature_flags == []
9393

94+
client1.add_feature_flag('a')
95+
client2.add_feature_flag('b')
96+
97+
assert client1.feature_flags == [FeatureFlag('a')]
98+
assert client2.feature_flags == [FeatureFlag('b')]
99+
94100
async def mutate_state(id):
95101
create_new_context()
96102

@@ -135,5 +141,5 @@ async def test():
135141
finally:
136142
loop.close()
137143

138-
assert client1.feature_flags == []
139-
assert client2.feature_flags == []
144+
assert client1.feature_flags == [FeatureFlag('a')]
145+
assert client2.feature_flags == [FeatureFlag('b')]

0 commit comments

Comments
 (0)