1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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))
|