Your IP : 216.73.216.213
�
��f� c @ sy d d l Z d d l m Z m Z m Z d d l m Z m Z m Z m Z m
Z
m Z m Z Gd d � d e j
� Z d S( i N( u is_instanceu Xu SomeClass( u Mocku MagicMocku NonCallableMagicMocku NonCallableMocku patchu create_autospecu
CallableMixinc B s� | Ee Z 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 d � Z d S( u TestCallablec C s0 | j t | t � � | j t | t � � d S( N( u
assertTrueu is_instanceu NonCallableMagicMocku assertFalseu
CallableMixin( u selfu mock( ( uH /opt/alt/python33/lib64/python3.3/unittest/test/testmock/testcallable.pyu assertNotCallable s u TestCallable.assertNotCallablec C sc x\ t � t � f D]H } | j t | � | j t | d � � | j | j j t | � � q Wd S( Nu __call__(
u NonCallableMagicMocku NonCallableMocku assertRaisesu TypeErroru assertFalseu hasattru assertInu __class__u __name__u repr( u selfu mock( ( uH /opt/alt/python33/lib64/python3.3/unittest/test/testmock/testcallable.pyu test_non_callable s u TestCallable.test_non_callablec C s0 | j t t t � � | j t t t � � d S( N( u
assertTrueu
issubclassu MagicMocku Mocku NonCallableMagicMocku NonCallableMock( u self( ( uH /opt/alt/python33/lib64/python3.3/unittest/test/testmock/testcallable.pyu test_heirarchy s u TestCallable.test_heirarchyc C sT t � } | j t t | j � t � � t � } | j t t | j � t � � d S( N( u NonCallableMocku
assertTrueu
issubclassu typeu oneu Mocku NonCallableMagicMocku twou MagicMock( u selfu oneu two( ( uH /opt/alt/python33/lib64/python3.3/unittest/test/testmock/testcallable.pyu test_attributes# s u TestCallable.test_attributesc C s� Gd d � d t � } | � } | j t t | j � | � � Gd d � d t � } | � } | j t t | j � | � � d S( Nc B s | Ee Z d Z d S( u- TestCallable.test_subclasses.<locals>.MockSubN( u __name__u
__module__u __qualname__( u
__locals__( ( uH /opt/alt/python33/lib64/python3.3/unittest/test/testmock/testcallable.pyu MockSub, s u MockSubc B s | Ee Z d Z d S( u. TestCallable.test_subclasses.<locals>.MagicSubN( u __name__u
__module__u __qualname__( u
__locals__( ( uH /opt/alt/python33/lib64/python3.3/unittest/test/testmock/testcallable.pyu MagicSub2 s u MagicSub( u Mocku
assertTrueu
issubclassu typeu oneu MagicMocku two( u selfu MockSubu oneu MagicSubu two( ( uH /opt/alt/python33/lib64/python3.3/unittest/test/testmock/testcallable.pyu test_subclasses+ s u TestCallable.test_subclassesc C sf t d t d d �} | j � } | j | j � | � } | j � | j | � | j t | � d S( Nu %s.Xu specT(
u patchu __name__u Trueu startu
addCleanupu stopu assert_called_once_withu assertNotCallableu assertRaisesu TypeError( u selfu patcheru mocku instance( ( uH /opt/alt/python33/lib64/python3.3/unittest/test/testmock/testcallable.pyu test_patch_spec9 s
u TestCallable.test_patch_specc C sf t d t d d �} | j � } | j | j � | � } | j � | j | � | j t | � d S( Nu %s.Xu spec_setT(
u patchu __name__u Trueu startu
addCleanupu stopu assert_called_once_withu assertNotCallableu assertRaisesu TypeError( u selfu patcheru mocku instance( ( uH /opt/alt/python33/lib64/python3.3/unittest/test/testmock/testcallable.pyu test_patch_spec_setE s
u TestCallable.test_patch_spec_setc C sV t d t d t � �} | j � } | j | j � | j | � | j t | � d S( Nu %s.Xu spec( u patchu __name__u Xu startu
addCleanupu stopu assertNotCallableu assertRaisesu TypeError( u selfu patcheru mock( ( uH /opt/alt/python33/lib64/python3.3/unittest/test/testmock/testcallable.pyu test_patch_spec_instanceQ s
u% TestCallable.test_patch_spec_instancec C sV t d t d t � �} | j � } | j | j � | j | � | j t | � d S( Nu %s.Xu spec_set( u patchu __name__u Xu startu
addCleanupu stopu assertNotCallableu assertRaisesu TypeError( u selfu patcheru mock( ( uH /opt/alt/python33/lib64/python3.3/unittest/test/testmock/testcallable.pyu test_patch_spec_set_instanceZ s
u) TestCallable.test_patch_spec_set_instancec C s5 Gd d � d t � } Gd d � d | � } Gd d � d t | � } x� d D]� } x� | | | f D]� } t d t i | | 6� �� } | � } | j � | j t | t � � | j t t
| d
� | � } | j � | d d d
� | j d d d
� | j d d d
� | j j d d d
� Wd QXqb WqL Wd S( Nc B s | Ee Z d Z d d � Z d S( u>