summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Rominger <arominge@redhat.com>2024-12-18 21:21:53 +0100
committerGitHub <noreply@github.com>2024-12-18 21:21:53 +0100
commitc0158181c3a5073038c2470bdb5549d4d68d0e1e (patch)
tree0335ef37175d617d943a0181b15f5a126a24bbdc
parentUpload container logs for live tests (#15713) (diff)
downloadawx-c0158181c3a5073038c2470bdb5549d4d68d0e1e.tar.xz
awx-c0158181c3a5073038c2470bdb5549d4d68d0e1e.zip
Fix test warnings that escaped somehow (#15714)
-rw-r--r--awx/main/tests/functional/models/test_workflow.py2
-rw-r--r--awx/main/tests/unit/utils/test_common.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/awx/main/tests/functional/models/test_workflow.py b/awx/main/tests/functional/models/test_workflow.py
index a21fbaa73b..924b5346c5 100644
--- a/awx/main/tests/functional/models/test_workflow.py
+++ b/awx/main/tests/functional/models/test_workflow.py
@@ -377,7 +377,7 @@ class TestWorkflowJobTemplatePrompts:
assert workflow_job.scm_branch is None
assert workflow_job.job_tags is None
assert workflow_job.skip_tags is None
- assert len(workflow_job.labels.all()) is 0
+ assert len(workflow_job.labels.all()) == 0
# fields from prompts used
workflow_job = workflow_job_template.create_unified_job(**prompts_data)
diff --git a/awx/main/tests/unit/utils/test_common.py b/awx/main/tests/unit/utils/test_common.py
index 261741ca5b..20585b8fa3 100644
--- a/awx/main/tests/unit/utils/test_common.py
+++ b/awx/main/tests/unit/utils/test_common.py
@@ -318,7 +318,7 @@ class TestHostnameRegexValidator:
def test_good_call(self, regex_expr, re_flags):
h = HostnameRegexValidator(regex=regex_expr, flags=re_flags)
- assert (h("192.168.56.101"), None)
+ assert h("192.168.56.101") is None
def test_bad_call(self, regex_expr, re_flags):
h = HostnameRegexValidator(regex=regex_expr, flags=re_flags)
@@ -336,4 +336,4 @@ class TestHostnameRegexValidator:
def test_bad_call_with_inverse(self, regex_expr, re_flags, inverse_match=True):
h = HostnameRegexValidator(regex=regex_expr, flags=re_flags, inverse_match=inverse_match)
- assert (h("@#$%)$#(TUFAS_DG"), None)
+ assert h("@#$%)$#(TUFAS_DG") is None