def test_assert_not_logs_fail(self): def add_log(self): self.node.add_log(NodeLog.UPDATED_FIELDS, {}, auth=self.auth) wrapped = test_utils.assert_not_logs(NodeLog.UPDATED_FIELDS, 'node')(add_log) assert_raises(AssertionError, lambda: wrapped(self))
def test_assert_not_logs_pass(self): def dont_add_log(self): pass wrapped = test_utils.assert_not_logs(NodeLog.UPDATED_FIELDS, 'node')(dont_add_log) wrapped(self)