# Path: kiel/events.py
# def wait_on_event(event, timeout=None):


import unittest
from mock import patch, Mock
from kiel import events





class EventsTests(unittest.TestCase):

    def test_wait_on_event_with_timeout(self):
        mock_event = Mock()

        events.wait_on_event(mock_event, timeout=60)

        mock_event.wait.assert_called_once_with(60)

    @patch("kiel.events.six")
    def test_wait_on_event_uses_no_timeout_on_py3(self, mock_six):
        mock_six.PY2 = False

        mock_event = Mock()


# Path: kiel/events.py
# def wait_on_event(event, timeout=None):


# Path: tests/test_events.py
import unittest
from mock import patch, Mock
from kiel import events






class EventsTests(unittest.TestCase):

    def test_wait_on_event_with_timeout(self):
        mock_event = Mock()

        events.wait_on_event(mock_event, timeout=60)

        mock_event.wait.assert_called_once_with(60)

    @patch("kiel.events.six")
    def test_wait_on_event_uses_no_timeout_on_py3(self, mock_six):
        mock_six.PY2 = False

        mock_event = Mock()


        events.wait_on_event(mock_event)