Skip to content

Commit

Permalink
fixup! Simplify ContextLocalState API
Browse files Browse the repository at this point in the history
  • Loading branch information
imjoehaines committed Aug 29, 2023
1 parent 7ab3310 commit abdddad
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ def test_state_is_stored_separately_per_async_context():
assert client1.feature_flags == []
assert client2.feature_flags == []

client1.add_feature_flag('a')
client2.add_feature_flag('b')

assert client1.feature_flags == [FeatureFlag('a')]
assert client2.feature_flags == [FeatureFlag('b')]

async def mutate_state(id):
create_new_context()

Expand Down Expand Up @@ -135,5 +141,5 @@ async def test():
finally:
loop.close()

assert client1.feature_flags == []
assert client2.feature_flags == []
assert client1.feature_flags == [FeatureFlag('a')]
assert client2.feature_flags == [FeatureFlag('b')]

0 comments on commit abdddad

Please sign in to comment.