summaryrefslogtreecommitdiffstats
path: root/src/account/test/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/account/test/common.py')
-rw-r--r--src/account/test/common.py46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/account/test/common.py b/src/account/test/common.py
new file mode 100644
index 0000000..2ffbbcf
--- /dev/null
+++ b/src/account/test/common.py
@@ -0,0 +1,46 @@
+# -*- encoding: utf-8 -*-
+# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Authors: Roman Rakus <rrakus@redhat.com
+#
+
+import pywbem
+import os
+import unittest
+
+"""
+Base class for all tests
+"""
+
+
+
+class AccountBase(unittest.TestCase):
+ """
+ Base class for all LMI Account tests
+ """
+ def setUp(self):
+ """
+ Connnect to server
+ """
+ self.url = os.environ.get("LMI_CIMOM_URL", "https://localhost:5989")
+ self.username = os.environ.get("LMI_CIMOM_USERNAME", "root")
+ self.password = os.environ.get("LMI_CIMOM_PASSWORD", "")
+ self.user_name = os.environ.get("LMI_ACCOUNT_USER")
+ self.group_name = os.environ.get("LMI_ACCOUNT_GROUP")
+ self.wbemconnection = pywbem.WBEMConnection(self.url,
+ (self.username, self.password))
+