def test_find(self, mock_glclient, mock_ksclient): login_args = {'username': '******', 'password': '******', 'tenant_name': 'test-tenant', 'auth_url': 'http://auth.url/blah'} ou = OpenstackUtils(**login_args) ou.find_image('some-repo-id', '1234abc') mock_glclient().images.list.assert_called_with(filters={'checksum': '1234abc', 'pulp_repo_id': 'some-repo-id', 'from_pulp': 'true'})
def test_find(self, mock_glclient, mock_ksclient): login_args = { 'username': '******', 'password': '******', 'tenant_name': 'test-tenant', 'auth_url': 'http://auth.url/blah' } ou = OpenstackUtils(**login_args) ou.find_image('some-repo-id', '1234abc') mock_glclient().images.list.assert_called_with( filters={ 'checksum': '1234abc', 'pulp_repo_id': 'some-repo-id', 'from_pulp': 'true' })