Skip to content

Commit 6cf6dae

Browse files
committed
add test description
1 parent 1b4a0b1 commit 6cf6dae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/unit/transformers/test_id.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,12 +586,16 @@ def test__reverse_transform_info_message(self, mock_logger):
586586
"""Test the ``_reverse_transform`` method.
587587
588588
Validate that the ``_reverse_transform`` method logs an info message when
589-
``cardinality_rule`` is ``None`` and the ``instance.data_length`` is bigger than
589+
``enforce_uniqueness`` is ``False`` and the ``instance.data_length`` is bigger than
590590
``instance.generator_size``.
591+
592+
In this test we also test the backward compatibility, so when the transformer
593+
does not have the ``cardinality_rule`` attribute, it should use the ``enforce_uniqueness``
594+
attribute. This is necessary to keep a coverage of 100%.
591595
"""
592596
# Setup
593597
instance = RegexGenerator('[A-Z]', cardinality_rule=None)
594-
del instance.cardinality_rule # coverage and backwards compatibility
598+
del instance.cardinality_rule
595599
instance.enforce_uniqueness = False
596600
instance.data_length = 6
597601
instance.generator_size = 5

0 commit comments

Comments
 (0)