From 5d07476fa6b85165be73c54f3bd793875b757c3d Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Fri, 9 Aug 2024 15:11:25 -0400 Subject: [PATCH] Fixes pytest CI error ``` /var/lib/awx/venv/awx/lib64/python3.11/site-packages/_pytest/python.py:163: PytestReturnNotNoneWarning: Expected None, but awx/main/tests/unit/test_tasks.py::TestJobCredentials::test_custom_environment_injectors_with_boolean_extra_vars returned ['successful', 0], which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? ``` * Dug into the git blame for this one 060585434abb5456935b7378211813b2ceaacaaa is the commit for any historians. It was wrongfully carried over from a mock pexpect implementation. Our new tests are nice. They don't go as far as trying to run the task so they do not need to mock pexpect. That is why it is safe to remove this code without finding it a new home. --- awx/main/tests/unit/test_tasks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/awx/main/tests/unit/test_tasks.py b/awx/main/tests/unit/test_tasks.py index 10ed00b186a9..6c460e3236ed 100644 --- a/awx/main/tests/unit/test_tasks.py +++ b/awx/main/tests/unit/test_tasks.py @@ -1259,7 +1259,6 @@ def test_custom_environment_injectors_with_boolean_extra_vars(self, job, private extra_vars = parse_extra_vars(args, private_data_dir) assert extra_vars["turbo_button"] == "True" - return ['successful', 0] def test_custom_environment_injectors_with_nested_extra_vars(self, private_data_dir, job, mock_me): task = jobs.RunJob()