summaryrefslogtreecommitdiff
path: root/tests/schema/panels/test_text.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/schema/panels/test_text.py')
-rw-r--r--tests/schema/panels/test_text.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/schema/panels/test_text.py b/tests/schema/panels/test_text.py
new file mode 100644
index 0000000..73abea2
--- /dev/null
+++ b/tests/schema/panels/test_text.py
@@ -0,0 +1,37 @@
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.text import Text
18
19
20class TestCaseText(TestCase):
21
22 def setUp(self):
23 super(TestCaseText, self).setUp()
24 self.schema = Text().get_schema()
25
26 def test_defaults(self):
27 # Ensure default values get parsed correctly.
28 defaults = {
29 'content': 'junk',
30 'editable': True,
31 'error': False,
32 'mode': 'markdown',
33 'span': 12,
34 'title': 'foobar',
35 'type': 'text',
36 }
37 self.assertEqual(self.schema(defaults), defaults)