Closed JHertz5 closed 6 months ago
Morning @JHertz5 ,
I must have changed my mind somewhere along the way and the way the test is written it didn't matter what called the attribute.
I do not believe I ever would have this, so thanks for finding it.
--Jeremy
Environment
Describe the bug This is a very minor problem, but: In the unit tests for the
rule.Rule
class, there is a test calledtest_rule_id
:This tests the attribute
identifier
. However, note that the last two lines set a new attributeid
that is used nowhere else in the codebae, and tests the value of that attribute instead ofindentifier
. This is an easy mistake to make and IMO it's a weakness of the language that is doesn't raise some kind of warning when this happens.To Reproduce Steps to reproduce the behavior:
id
is not an attribute of therule.Rule
class.Expected behavior This test should test the
identifier
attribute.