Closed loleary closed 2 months ago
Can one of the admins verify this patch?
Hi @loleary - Sorry for bringing this trouble, as we just resolved an urgent bug within the repo. Please rebase the master branch of your fork of insights-core and then rebase this branch again. Please reach out to me for any problems when doing the rebase. Apologize again.
All Pull Requests:
Check all that apply:
Complete Description of Additions/Changes:
Using
run_test
withexpected
parameter DOES NOT perform expected assertion ifexpected
value evaluates to false. For example, ifexpected
is an empty list or dict or str or a bool value ofFalse
. The result is that no assertion is performed meaning that when checking that an integration test for acondition
, for example, returnsFalse
but it instead, in error, returnsTrue
,run_test
does not perform the assertion giving the impression that the test passes even though it does not.This change fixes this by using a default sentinel value for
expected
and always performing the assertion unlessexpected
is the sentinel value.This change required updating an existing integration test. Additionally, it is important to note that this change will result in existing integration tests to fail which have fallen victim to this bug as well as any calls to
run_test
that explicitly passexpected=None
thinking that it should mean do not perform any assertions.