<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
B
    VXY
                 @   sv   d dl Z d dlZG dd deZG dd deZG dd deZG dd	 d	eZG d
d de	Z
G dd de jZdS )    Nc               @   s   e Zd Zdd ZdS )ForJsonc             C   s   ddiS )Nfor_json    )selfr   r   Q/opt/alt/python37/lib64/python3.7/site-packages/simplejson/tests/test_for_json.pyr      s    zForJson.for_jsonN)__name__
__module____qualname__r   r   r   r   r   r      s   r   c               @   s   e Zd Zdd ZdS )NestedForJsonc             C   s
   dt  iS )Nnested)r   )r   r   r   r   r      s    zNestedForJson.for_jsonN)r   r	   r
   r   r   r   r   r   r   
   s   r   c               @   s   e Zd Zdd ZdS )ForJsonListc             C   s   dgS )Nlistr   )r   r   r   r   r      s    zForJsonList.for_jsonN)r   r	   r
   r   r   r   r   r   r      s   r   c               @   s   e Zd Zdd ZdS )DictForJsonc             C   s   ddiS )NZalphar   r   )r   r   r   r   r      s    zDictForJson.for_jsonN)r   r	   r
   r   r   r   r   r   r      s   r   c               @   s   e Zd Zdd ZdS )ListForJsonc             C   s   dgS )Nr   r   )r   r   r   r   r      s    zListForJson.for_jsonN)r   r	   r
   r   r   r   r   r   r      s   r   c               @   sn   e Zd ZdddZdd Zdd Zdd	 Zd
d Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd ZdS )TestForJsonTc             C   s8   |d krt |}nt j||d}| t || d S )N)r   )jsondumpsZassertEqualloads)r   objotherr   sr   r   r   assertRoundTrip   s    zTestForJson.assertRoundTripc             C   s   |  t t   d S )N)r   r   r   )r   r   r   r   (test_for_json_encodes_stand_alone_object)   s    z4TestForJson.test_for_json_encodes_stand_alone_objectc             C   s    |  dt idt  i d S )NZhooray)r   r   r   )r   r   r   r   +test_for_json_encodes_object_nested_in_dict.   s    z7TestForJson.test_for_json_encodes_object_nested_in_dictc             C   s0   |  ddt ddgiddt  ddgi d S )Nr   r         )r   r   r   )r   r   r   r   7test_for_json_encodes_object_nested_in_list_within_dict3   s    zCTestForJson.test_for_json_encodes_object_nested_in_list_within_dictc             C   s   |  t dddii d S )Nr   r   r   )r   r   )r   r   r   r   1test_for_json_encodes_object_nested_within_object8   s    z=TestForJson.test_for_json_encodes_object_nested_within_objectc             C   s   |  t t   d S )N)r   r   r   )r   r   r   r   test_for_json_encodes_list=   s    z&TestForJson.test_for_json_encodes_listc             C   s    |  dt idt  i d S )Nr   )r   r   r   )r   r   r   r   (test_for_json_encodes_list_within_objectB   s    z4TestForJson.test_for_json_encodes_list_within_objectc             C   s    |  tddtdd  d S )Nr   )a)r   r   r   )r   r   r   r   #test_for_json_encodes_dict_subclassG   s    z/TestForJson.test_for_json_encodes_dict_subclassc             C   s    |  tdgtdg  d S )Nl)r   r   r   )r   r   r   r   #test_for_json_encodes_list_subclassL   s    z/TestForJson.test_for_json_encodes_list_subclassc             C   s,   x&dD ]}| j tddddi|d qW d S )N)NFr   )r!   r!   )r   )r   r   )r   r   r   r   r   4test_for_json_ignored_if_not_true_with_dict_subclassQ   s
    
z@TestForJson.test_for_json_ignored_if_not_true_with_dict_subclassc             C   s*   x$dD ]}| j tdgdg|d qW d S )N)NFr#   )r   )r   r   )r   r   r   r   r   4test_for_json_ignored_if_not_true_with_list_subclassX   s
    
z@TestForJson.test_for_json_ignored_if_not_true_with_list_subclassc             C   s,   |  ttjt  | j ttjt dd d S )NF)r   )ZassertRaises	TypeErrorr   r   r   )r   r   r   r   6test_raises_typeerror_if_for_json_not_true_with_object_   s    zBTestForJson.test_raises_typeerror_if_for_json_not_true_with_objectN)T)r   r	   r
   r   r   r   r   r   r   r    r"   r$   r%   r&   r(   r   r   r   r   r      s   

r   )ZunittestZ
simplejsonr   objectr   r   r   dictr   r   r   ZTestCaser   r   r   r   r   <module>   s   