Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/cinderclient/tests/unit/__pycache__/fakes.cpython-39.pyc
Ðазад
a t�hG � @ s. d Z ddlmZ ddd�ZG dd� de�ZdS ) a A fake server that "responds" to API methods with pre-canned responses. All of these responses come from the spec, so if for some reason the spec's wrong the tests might raise AssertionError. I've indicated in comments the places where actual behavior differs from the spec. � )�print_functionNc C sh |pg }|pg }|D ]N}z|| v s&J �W q t y` t| ��t|| ��}t dt|� ��Y q0 qd S )Nzfound unexpected keys: %s)�AssertionError�set� difference�list)�dict�required�optional�kZ extra_keys� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/cinderclient/tests/unit/fakes.py�assert_has_keys s �r c @ s@ e Zd Zdd� Zdd� Zddd�Zdd d �Zdd� Zd d� ZdS )� FakeClientc C sj d}zF|� � D ]8\}}t|t�r2| �||| �}q|| |ksBJ �d}qW n ttfyd d}Y n0 |S )NTF)�items� isinstancer �_dict_matchr �KeyError)�self�partial�real�result�key�valuer r r r ( s zFakeClient._dict_matchc C s<