Browse Source

Fix logs buffer clearing and clear it before each test

opensearch
Jotham Apaloo 7 years ago
parent
commit
b1950d5038
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      tests/mockLogzioListener/listener.py
  2. +1
    -0
      tests/test_logzioSender.py

+ 1
- 1
tests/mockLogzioListener/listener.py View File

@ -73,7 +73,7 @@ class MockLogzioListener:
return len(self.logs_list)
def clear_logs_buffer(self):
self.logs_list = []
self.logs_list[:] = []
def set_server_error(self):
self.persistent_flags.set_server_error()


+ 1
- 0
tests/test_logzioSender.py View File

@ -21,6 +21,7 @@ def _find(pattern, path):
class TestLogzioSender(TestCase):
def setUp(self):
self.logzio_listener = listener.MockLogzioListener()
self.logzio_listener.clear_logs_buffer()
self.logzio_listener.clear_server_error()
self.logs_drain_timeout = 1


Loading…
Cancel
Save