Skip to content

Commit

Permalink
Fix emitter unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmiermans committed Jul 5, 2022
1 parent 9f876a9 commit 2431abb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aio_snowplow_tracker/test/unit/test_emitters.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async def test_input_no_flush(self, mok_flush: Any) -> None:
self.assertFalse(e.reached_limit())
mok_flush.assert_not_called()

@async_patch('aio_snowplow_tracker.Emitter.flush')
@async_patch('aio_snowplow_tracker.Emitter._flush_unsafe')
async def test_input_flush_byte_limit(self, mok_flush: Any) -> None:
mok_flush.side_effect = mocked_flush

Expand All @@ -139,7 +139,7 @@ async def test_input_flush_byte_limit(self, mok_flush: Any) -> None:
self.assertTrue(e.reached_limit())
self.assertEqual(mok_flush.call_count, 1)

@async_patch('aio_snowplow_tracker.Emitter.flush')
@async_patch('aio_snowplow_tracker.Emitter._flush_unsafe')
async def test_input_flush_buffer(self, mok_flush: Any) -> None:
mok_flush.side_effect = mocked_flush

Expand All @@ -158,7 +158,7 @@ async def test_input_flush_buffer(self, mok_flush: Any) -> None:
self.assertTrue(e.reached_limit())
self.assertEqual(mok_flush.call_count, 1)

@async_patch('aio_snowplow_tracker.Emitter.flush')
@async_patch('aio_snowplow_tracker.Emitter._flush_unsafe')
async def test_input_bytes_queued(self, mok_flush: Any) -> None:
mok_flush.side_effect = mocked_flush

Expand All @@ -172,7 +172,7 @@ async def test_input_bytes_queued(self, mok_flush: Any) -> None:
await e.input(nvPairs)
self.assertEqual(e.bytes_queued, 48)

@async_patch('aio_snowplow_tracker.Emitter.flush')
@async_patch('aio_snowplow_tracker.Emitter._flush_unsafe')
async def test_input_bytes_post(self, mok_flush: Any) -> None:
mok_flush.side_effect = mocked_flush

Expand Down

0 comments on commit 2431abb

Please sign in to comment.