Skip to content

test_iorw

test_ensure_client_on_noteable_handler_read_function(noteable_client, mock_run_sync) #

Ensure that a client is created when read is called on the NoteableHandler as a function

Source code in tests/test_iorw.py
17
18
19
20
21
22
def test_ensure_client_on_noteable_handler_read_function(noteable_client, mock_run_sync):
    """Ensure that a client is created when `read` is called on the NoteableHandler as a function"""
    NoteableHandler.read('test')

    # Assert that a client was created
    noteable_client.assert_called_once()

test_ensure_client_on_noteable_handler_read_method(noteable_client, mock_run_sync) #

Ensure that a client is created when read is called on the NoteableHandler as a method

Source code in tests/test_iorw.py
25
26
27
28
29
30
def test_ensure_client_on_noteable_handler_read_method(noteable_client, mock_run_sync):
    """Ensure that a client is created when `read` is called on the NoteableHandler as a method"""
    NoteableHandler(noteable_client).read('test')

    # Assert that a client was not created because one was passed in
    noteable_client.assert_not_called()