Skip to content

Commit 56e968e

Browse files
committed
remove inline comments
1 parent f08fa5f commit 56e968e

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

tests/test_transaction_context_in_hooks.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,24 @@ def before(self, hook_context, hints):
2727

2828
def test_transaction_context_merged_into_hook_context():
2929
"""Test that transaction context is merged into the hook context's evaluation context."""
30-
# Set up transaction context propagator
3130
set_transaction_context_propagator(ContextVarsTransactionContextPropagator())
3231

33-
# Set up a provider
3432
provider = NoOpProvider()
3533
set_provider(provider)
3634

37-
# Create a client
3835
client = OpenFeatureClient(domain=None, version=None)
3936

40-
# Create and add a hook that will check for transaction context
4137
hook = TransactionContextHook()
4238
client.add_hooks([hook])
4339

44-
# Set transaction context with a specific attribute
4540
transaction_context = EvaluationContext(
4641
targeting_key="transaction",
4742
attributes={"transaction_attr": "transaction_value"},
4843
)
4944
set_transaction_context(transaction_context)
5045

51-
# Evaluate a flag
5246
client.get_boolean_value(flag_key="test-flag", default_value=False)
5347

54-
# Verify that the hook was called and saw the transaction context
5548
assert hook.before_called, "Hook's before method was not called"
5649
assert hook.transaction_attr_value == "transaction_value", (
5750
"Transaction context attribute was not found in hook context"

0 commit comments

Comments
 (0)