Switch out existing obfuscated license with external module

This creates a new fallback license module called StubLicense that
will be used in the event that the tower_license module is not
installed.

All existing license mechanisms are routed through the get_licenser()
util method
This commit is contained in:
Matthew Jones
2017-07-11 12:01:24 -04:00
parent 7fda3c0658
commit 8486944eaa
13 changed files with 83 additions and 45 deletions

View File

@@ -268,7 +268,7 @@ class TestCheckLicense:
def exists(self):
return host_exists
mocker.patch('awx.main.tasks.TaskEnhancer.validate_enhancements', return_value={'free_instances': free_instances, 'available_instances': available_instances, 'date_warning': True})
mocker.patch('tower_license.TowerLicense.validate', return_value={'free_instances': free_instances, 'available_instances': available_instances, 'date_warning': True})
mock_filter = MockFilter()
mocker.patch('awx.main.models.Host.objects.filter', return_value=mock_filter)