Beispiel #1
0
    def teardown_class(cls):
        """
            This method is called once when all tests have been done.
            It restores the saved configuration.
        """
        cls.client.call('network','setNetconfig',cls.orig,'pas de message')
        cls.client.call('config','apply')
        cls.client.logout()

        # Let's check that eth0 isn't affected by our changes
        a = 0
        while a < 200:
            with open("/sys/class/net/eth0/operstate","r") as fd:
                state = fd.readlines()
                assert "up\n" in state, "eth0 changes when it shouldn't"
            sleep(0.2)
            a+=1

        Test.cleanMyDir(cls.test_path)
        Test.teardown_class()