summaryrefslogtreecommitdiffstats
path: root/src/account/test/common.py
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2013-01-16 15:10:59 +0100
committerJan Safranek <jsafrane@redhat.com>2013-01-16 15:10:59 +0100
commit5422c49f7f1d99263c5fa522774b6a5fd33bd528 (patch)
tree03872e7b5385dd08226f798ed66818f2b7baea2a /src/account/test/common.py
parentfcfb2aa6c76759f19e859b00dc2cbcd9f12bde2c (diff)
parent8bdd20cd739de9399cc71d8f82eff55dc4c6d346 (diff)
downloadopenlmi-providers-5422c49f7f1d99263c5fa522774b6a5fd33bd528.tar.gz
openlmi-providers-5422c49f7f1d99263c5fa522774b6a5fd33bd528.tar.xz
openlmi-providers-5422c49f7f1d99263c5fa522774b6a5fd33bd528.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/openlmi-providers
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))
+