'Opening the database without the megacache enabled should raise an exception.'

@raises(OperationNotEnabledByConfigurationException)
def test_open_dbhandler(self):

    self.session.config.get_megacache_enabled = (lambda : False)
    self.session.open_dbhandler('x')
