File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import asynctest
88from syncrypt .app import SyncryptApp
99from syncrypt .backends import BinaryStorageBackend , LocalStorageBackend
10+ from syncrypt .backends .binary import get_manager_instance
1011from syncrypt .models import Vault
1112from syncrypt .config import AppConfig
1213from syncrypt .app .auth import CredentialsAuthenticationProvider
@@ -52,3 +53,7 @@ def setUp(self):
5253 self .app = SyncryptApp (self .app_config , auth_provider = TestAuthenticationProvider ())
5354 asyncio .get_event_loop ().run_until_complete (self .app .initialize ())
5455
56+ def tearDown (self ):
57+ asyncio .get_event_loop ().run_until_complete (self .app .close ())
58+ asyncio .get_event_loop ().run_until_complete (get_manager_instance ().close ())
59+
Original file line number Diff line number Diff line change @@ -207,13 +207,10 @@ def test_take_only_one_connection(self):
207207 yield from app .get_remote_size_for_vault (vault )
208208 yield from app .get_remote_size_for_vault (vault )
209209
210- print (get_manager_instance ().get_stats ())
211-
212210 self .assertEqual (get_manager_instance ().get_stats ()['idle' ], 1 )
213- self . assertEqual ( get_manager_instance (). get_stats ()[ 'busy' ], 0 )
211+
214212
215213if __name__ == '__main__' :
216214 from syncrypt .utils .logging import setup_logging
217215 setup_logging (logging .DEBUG )
218216 unittest .main ()
219-
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ def count_files(folder):
2323 return len ([name for name in os .listdir (folder ) if name != '.vault' ])
2424
2525@pytest .mark .requires_server
26+ @pytest .mark .hypothesis
2627class HypoBinaryTestCase (asynctest .TestCase ):
2728 folder = 'tests/testbinaryempty/'
2829
You can’t perform that action at this time.
0 commit comments