forked from brutasse/graphite-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow empty finders configuration, added test for it. Resolves brutas…
…se#212, resolves brutasse#207
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
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,21 @@ | ||
time_zone: UTC | ||
allowed_origins: | ||
- example.com | ||
- foo.example.com:8888 | ||
cache: | ||
type: simple | ||
default_timeout: 0 | ||
logging: | ||
version: 1 | ||
disable_existing_loggers: true | ||
handlers: | ||
stdout: | ||
class: logging.StreamHandler | ||
loggers: | ||
graphite_api: | ||
handlers: | ||
- stdout | ||
propagate: true | ||
level: INFO | ||
finders: | ||
- |
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,14 @@ | ||
import os | ||
import unittest | ||
|
||
os.environ['GRAPHITE_API_CONFIG'] = os.path.join( | ||
os.path.dirname(__file__), 'no_finders_conf.yaml') # noqa | ||
|
||
from graphite_api.app import app | ||
from graphite_api.config import configure | ||
|
||
class NoFindersTest(unittest.TestCase): | ||
|
||
def test_app_no_finders(self): | ||
configure(app) | ||
self.assertTrue(app is not None) |