Skip to content

Commit

Permalink
Update conftest.py to use request.node.originalname instead for legal…
Browse files Browse the repository at this point in the history
… topic naming (#172)

* Update conftest.py to use request.node.originalname instead for legal topic naming

Otherwise parametrization doesn't work.

* Update test/conftest.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

---------

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>
  • Loading branch information
wbarnha and code-review-doctor[bot] authored Mar 20, 2024
1 parent 2f2ccb1 commit 0259502
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def factory(**kafka_admin_client_params):
@pytest.fixture
def topic(kafka_broker, request):
"""Return a topic fixture"""
topic_name = '%s_%s' % (request.node.name, random_string(10))
topic_name = f'{request.node.originalname}_{random_string(10)}'
kafka_broker.create_topics([topic_name])
return topic_name

Expand Down

0 comments on commit 0259502

Please sign in to comment.