Skip to content

Commit 1e7cd7a

Browse files
committed
Various test fixes
1 parent e74bb68 commit 1e7cd7a

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

tests/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import asynctest
88
from syncrypt.app import SyncryptApp
99
from syncrypt.backends import BinaryStorageBackend, LocalStorageBackend
10+
from syncrypt.backends.binary import get_manager_instance
1011
from syncrypt.models import Vault
1112
from syncrypt.config import AppConfig
1213
from 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+

tests/test_binary.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff 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

215213
if __name__ == '__main__':
216214
from syncrypt.utils.logging import setup_logging
217215
setup_logging(logging.DEBUG)
218216
unittest.main()
219-

tests/test_hypo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
2627
class HypoBinaryTestCase(asynctest.TestCase):
2728
folder = 'tests/testbinaryempty/'
2829

0 commit comments

Comments
 (0)