3 �}:a � @ s2 d Z ddlZG dd� dej�Zedkr.ej� dS )zTests for josepy.interfaces.� Nc @ sl e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� Zdd� Z dd� ZdS )�JSONDeSerializableTestc s� ddl m} G dd� d|�� G � fdd�d|�}G dd� d|�}� d �| _� d �| _|| j| j�| _|| j| j�| _� | jgg�| _� d�| _� | _|| _ || _ d S ) Nr )�JSONDeSerializablec @ s( e Zd Zdd� Zdd� Zedd� �ZdS )z+JSONDeSerializableTest.setUp.<locals>.Basicc S s || _ d S )N)�v)�selfr � r �%/usr/lib/python3.6/interfaces_test.py�__init__ s z4JSONDeSerializableTest.setUp.<locals>.Basic.__init__c S s | j S )N)r )r r r r �to_partial_json s z;JSONDeSerializableTest.setUp.<locals>.Basic.to_partial_jsonc S s | |�S )Nr )�cls�jobjr r r � from_json s z5JSONDeSerializableTest.setUp.<locals>.Basic.from_jsonN)�__name__� __module__�__qualname__r r �classmethodr r r r r �Basic s r c s, e Zd Zdd� Zdd� Ze� fdd��ZdS )z.JSONDeSerializableTest.setUp.<locals>.Sequencec S s || _ || _d S )N)�x�y)r r r r r r r s z7JSONDeSerializableTest.setUp.<locals>.Sequence.__init__c S s | j | jgS )N)r r )r r r r r s z>JSONDeSerializableTest.setUp.<locals>.Sequence.to_partial_jsonc s | � j |d �� j |d ��S )Nr � )r )r r )r r r r s z8JSONDeSerializableTest.setUp.<locals>.Sequence.from_jsonN)r r r r r r r r )r r r �Sequence s r c @ s( e Zd Zdd� Zdd� Zedd� �ZdS )z-JSONDeSerializableTest.setUp.<locals>.Mappingc S s || _ || _d S )N)r r )r r r r r r r &