Beispiel #1
0
 def setUp(self):
     self.a = Authentications()
     self.data = {
         "host": "igw1",
         "authentication": "tpg",
         "tpg": {
             "userid": "common1",
             "password": "******"
         }
     }
     self.a.add(self.data)
Beispiel #2
0
class AuthenticationsTestCase(unittest.TestCase):

    def setUp(self):
        self.a = Authentications()
        self.data =  { "host": "igw1", "authentication": "tpg",
                       "tpg": { "userid": "common1", "password": "******" } }
        self.a.add(self.data)

    def test_add(self):
        self.a.display()
        assert self.a.authentications[0]['authentication'] == "tpg"

    def test_purge(self):
        Common.hostname = "igw2"
        self.a.purge()
        self.a.display()
        assert not self.a.authentications
Beispiel #3
0
class AuthenticationsTestCase(unittest.TestCase):
    def setUp(self):
        self.a = Authentications()
        self.data = {
            "host": "igw1",
            "authentication": "tpg",
            "tpg": {
                "userid": "common1",
                "password": "******"
            }
        }
        self.a.add(self.data)

    def test_add(self):
        self.a.display()
        assert self.a.authentications[0]['authentication'] == "tpg"

    def test_purge(self):
        Common.hostname = "igw2"
        self.a.purge()
        self.a.display()
        assert not self.a.authentications
Beispiel #4
0
 def setUp(self):
     self.a = Authentications()
     self.data =  { "host": "igw1", "authentication": "tpg",
                    "tpg": { "userid": "common1", "password": "******" } }
     self.a.add(self.data)