forked from ansible/galaxy_ng
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load required settings from django-ansible-base if not set. (ansible#…
…2176) * Load required settings from django-ansible-base if not set. No-Issue
- Loading branch information
1 parent
db23c5c
commit 2986b15
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.test import TestCase | ||
from django.conf import settings | ||
from ansible_base.lib.dynamic_config import dynamic_settings | ||
|
||
|
||
DAB_REQUIRED_SETTINGS = [key for key in dir(dynamic_settings) if key.isupper()] | ||
|
||
|
||
class TestSetting(TestCase): | ||
def test_dab_settings_are_loaded(self): | ||
"""Ensure all required settings from DAB are configured on Galaxy""" | ||
notset = object() | ||
for key in DAB_REQUIRED_SETTINGS: | ||
key_on_galaxy = settings.get(key, notset) | ||
self.assertIsNot(key_on_galaxy, notset) |