Esempio n. 1
0
 def setUp(self):
     self.a = Authentications()
     self.data = {
         "host": "igw1",
         "authentication": "tpg",
         "tpg": {
             "userid": "common1",
             "password": "******"
         }
     }
     self.a.add(self.data)
Esempio n. 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
Esempio n. 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
Esempio n. 4
0
 def setUp(self):
     self.a = Authentications()
     self.data =  { "host": "igw1", "authentication": "tpg",
                    "tpg": { "userid": "common1", "password": "******" } }
     self.a.add(self.data)