Esempio n. 1
0
    def test_session_is_not_deleted_after_server_shutdown(self):
        """
        - delete server with active session
        Expected: session not deleted
        """
        from core.sessions import Session
        session = Session()
        session.closed = False

        with patch('core.sessions.Sessions.get_session',
                   Mock(return_value=session)):
            del self.vmmaster

        self.assertFalse(session.closed)
        session.failed()

        server_is_down(self.address)
Esempio n. 2
0
 def tearDown(self):
     self.vmmaster.app.sessions.kill_all()
     self.ctx.pop()
     del self.vmmaster
     server_is_down(self.address)
Esempio n. 3
0
 def tearDown(self):
     del self.vmmaster
     server_is_down(self.address)
     self.ctx.pop()