diff --git a/awx/main/tests/conftest.py b/awx/main/tests/conftest.py index a8e504be22..679577858f 100644 --- a/awx/main/tests/conftest.py +++ b/awx/main/tests/conftest.py @@ -1,6 +1,5 @@ # Python -import time import pytest import mock from contextlib import contextmanager diff --git a/awx/main/tests/functional/api/test_settings.py b/awx/main/tests/functional/api/test_settings.py index f67d9f0fe7..8083fb2d2d 100644 --- a/awx/main/tests/functional/api/test_settings.py +++ b/awx/main/tests/functional/api/test_settings.py @@ -127,9 +127,6 @@ def test_radius_settings(get, put, patch, delete, admin, settings): def test_ui_settings(get, put, patch, delete, admin): url = reverse('api:setting_singleton_detail', kwargs={'category_slug': 'ui'}) response = get(url, user=admin, expect=200) - assert 'CUSTOM_LOGO' not in response.data - assert 'CUSTOM_LOGIN_INFO' not in response.data - response = get(url, user=admin, expect=200) assert not response.data['CUSTOM_LOGO'] assert not response.data['CUSTOM_LOGIN_INFO'] put(url, user=admin, data=response.data, expect=200) diff --git a/awx/main/tests/functional/core/test_licenses.py b/awx/main/tests/functional/core/test_licenses.py index b828f49110..f59318502c 100644 --- a/awx/main/tests/functional/core/test_licenses.py +++ b/awx/main/tests/functional/core/test_licenses.py @@ -5,7 +5,7 @@ from awx.main.utils.common import StubLicense def test_stub_license(): - license_actual = StubLicense() + license_actual = StubLicense().validate() assert license_actual['license_key'] == 'OPEN' assert license_actual['valid_key'] assert license_actual['compliant'] diff --git a/awx/main/tests/unit/test_access.py b/awx/main/tests/unit/test_access.py index b733895744..61660afeb0 100644 --- a/awx/main/tests/unit/test_access.py +++ b/awx/main/tests/unit/test_access.py @@ -1,11 +1,9 @@ import pytest import mock -import os from django.contrib.auth.models import User from django.forms.models import model_to_dict from rest_framework.exceptions import ParseError -from rest_framework.exceptions import PermissionDenied from awx.main.access import ( BaseAccess, diff --git a/awx/main/utils/common.py b/awx/main/utils/common.py index 5447f32f0f..3d51e488a9 100644 --- a/awx/main/utils/common.py +++ b/awx/main/utils/common.py @@ -163,10 +163,23 @@ def get_awx_version(): class StubLicense(object): + features = { + 'activity_streams': True, + 'ha': True, + 'ldap': True, + 'multiple_organizations': True, + 'surveys': True, + 'system_tracking': True, + 'rebranding': True, + 'enterprise_auth': True, + 'workflows': True, + } + def validate(self): return dict(license_key='OPEN', valid_key=True, compliant=True, + features=self.features, license_type='open')