Show More
@@ -76,12 +76,15 b' def test_repo_maker_uses_session_for_ins' | |||
|
76 | 76 | 'http://server_and_port/endpoint', data=mock.ANY) |
|
77 | 77 | |
|
78 | 78 | |
|
79 | @mock.patch('rhodecode.lib.vcs.client_http.ThreadlocalSessionFactory') | |
|
79 | 80 | @mock.patch('rhodecode.lib.vcs.connection') |
|
80 |
def test_connect_passes_in_the_same_session(connection, |
|
|
81 | session_factory_patcher = mock.patch.object( | |
|
82 | vcs, '_create_http_rpc_session', return_value=stub_session) | |
|
83 | with session_factory_patcher: | |
|
81 | def test_connect_passes_in_the_same_session(connection, session_factory_class, | |
|
82 | stub_session): | |
|
83 | session_factory = session_factory_class.return_value | |
|
84 | session_factory.return_value = stub_session | |
|
85 | ||
|
84 | 86 |
|
|
85 | assert connection.Hg._session == stub_session | |
|
86 |
assert connection. |
|
|
87 |
assert connection. |
|
|
87 | ||
|
88 | assert connection.Hg._session_factory() == stub_session | |
|
89 | assert connection.Svn._session_factory() == stub_session | |
|
90 | assert connection.Git._session_factory() == stub_session |
General Comments 0
You need to be logged in to leave comments.
Login now