diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5a90ff60..e18821cd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,7 +5,7 @@ Changelog Version 14.1 ============ -* Require iqm-client >= 17.6. +* Require iqm-client >= 17.6. `#132 `_ Version 14.0 ============ diff --git a/tests/test_iqm_sampler.py b/tests/test_iqm_sampler.py index cd888b5d..8db68577 100644 --- a/tests/test_iqm_sampler.py +++ b/tests/test_iqm_sampler.py @@ -16,7 +16,7 @@ import uuid import cirq -from mockito import ANY, expect, mock, verify, when +from mockito import ANY, mock, verify, when import numpy as np import pytest import sympy # type: ignore @@ -374,6 +374,8 @@ def test_close_client(): 'password': 'fake-password', } sampler = IQMSampler('http://url', Adonis(), **user_auth_args) - sampler._client = mock(IQMClient) - expect(sampler._client, times=1).close_auth_session().thenReturn(True) + mock_client = mock(IQMClient) + sampler._client = mock_client + when(mock_client).close_auth_session().thenReturn(True) sampler.close_client() + verify(mock_client, times=1).close_auth_session()