diff --git a/bodhi-server/bodhi/server/__init__.py b/bodhi-server/bodhi/server/__init__.py index 5b76da8e5d..7c5e6d8894 100644 --- a/bodhi-server/bodhi/server/__init__.py +++ b/bodhi-server/bodhi/server/__init__.py @@ -335,9 +335,6 @@ def main(global_config, testing=None, session=None, **settings): # the return value. generic._generate_home_page_stats() - # Let's close out the db session we used to warm the caches. - Session.remove() - log.info('Bodhi ready and at your service!') app = config.make_wsgi_app() return app diff --git a/bodhi-server/tests/test___init__.py b/bodhi-server/tests/test___init__.py index 6344b6f9e9..a122e12804 100644 --- a/bodhi-server/tests/test___init__.py +++ b/bodhi-server/tests/test___init__.py @@ -143,13 +143,6 @@ def test_authtkt_timeout_undefined(self, set_security_policy): assert policy.helper.timeout == 86400 set_security_policy.assert_called_once_with(policy) - def test_calls_session_remove(self): - """Let's assert that main() calls Session.remove().""" - with mock.patch('bodhi.server.Session.remove') as remove: - server.main({}, session=self.db, **self.app_settings) - - remove.assert_called_once_with() - @mock.patch('bodhi.server.bugs.set_bugtracker') def test_calls_set_bugtracker(self, set_bugtracker): """