summaryrefslogtreecommitdiff
path: root/tests/schema/panels/test_dashlist.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/schema/panels/test_dashlist.py')
-rw-r--r--tests/schema/panels/test_dashlist.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/schema/panels/test_dashlist.py b/tests/schema/panels/test_dashlist.py
new file mode 100644
index 0000000..953f3ad
--- /dev/null
+++ b/tests/schema/panels/test_dashlist.py
@@ -0,0 +1,39 @@
1# Copyright 2015 Red Hat, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15from testtools import TestCase
16
17from grafana_dashboards.schema.panel.dashlist import Dashlist
18
19
20class TestCaseDashlist(TestCase):
21
22 def setUp(self):
23 super(TestCaseDashlist, self).setUp()
24 self.schema = Dashlist().get_schema()
25
26 def test_defaults(self):
27 # Ensure default values get parsed correctly.
28 defaults = {
29 'editable': True,
30 'error': False,
31 'limit': 10,
32 'mode': 'starred',
33 'query': '',
34 'span': 12,
35 'tag': '',
36 'title': 'foobar',
37 'type': 'dashlist',
38 }
39 self.assertEqual(self.schema(defaults), defaults)