From c4d8485c814da453c7884a4e9b038c70421a8251 Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Fri, 24 Sep 2021 10:16:11 -0400 Subject: [PATCH] Update license test to work with http(s) urls in requirements files --- awx/main/tests/functional/test_licenses.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/awx/main/tests/functional/test_licenses.py b/awx/main/tests/functional/test_licenses.py index 0399cfbe59..62a7291115 100644 --- a/awx/main/tests/functional/test_licenses.py +++ b/awx/main/tests/functional/test_licenses.py @@ -57,7 +57,10 @@ def test_python_and_js_licenses(): if version.startswith('=='): version = version[2:] if reqt.link: - (name, version) = reqt.link.filename.split('@', 1) + if str(reqt.link).startswith(('http://', 'https://')): + (name, version) = str(reqt.req).split('==', 1) + else: + (name, version) = reqt.link.filename.split('@', 1) if name.endswith('.git'): name = name[:-4] if name == 'receptor':