summaryrefslogtreecommitdiffstats
path: root/tests/utils_cib.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils_cib.py')
-rw-r--r--tests/utils_cib.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/utils_cib.py b/tests/utils_cib.py
new file mode 100644
index 0000000..9052dd1
--- /dev/null
+++ b/tests/utils_cib.py
@@ -0,0 +1,24 @@
+# -*- coding: UTF-8 -*-
+# Copyright 2014 Red Hat, Inc.
+# Part of clufter project
+# Licensed under GPLv2+ (a copy included | http://gnu.org/licenses/gpl-2.0.txt)
+"""Testing CIB helpers"""
+__author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>"
+
+import unittest
+
+import _bootstrap # known W402, required
+
+from clufter.utils_cib import ResourceSpec
+
+class TestResourceSpec(unittest.TestCase):
+ def test_xsl_attrs_ocf(self):
+ rs = ResourceSpec('ocf:heartbeat:Filesystem')
+ self.assertTrue(rs.res_class == 'ocf')
+ self.assertTrue(rs.res_provider == 'heartbeat')
+ self.assertTrue(rs.res_type == 'Filesystem')
+
+ def test_xsl_attrs_systemd(self):
+ rs = ResourceSpec('systemd:smb')
+ self.assertTrue(rs.res_class == 'systemd')
+ self.assertTrue(rs.res_type == 'smb')