Update license test to work with http(s) urls in requirements files

This commit is contained in:
Shane McDonald
2021-09-24 10:16:11 -04:00
parent dbb1a0c733
commit c4d8485c81

View File

@@ -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':