/usr/lib/python2.6/site-packages/openstackclient/tests/common
Edit: /usr/lib/python2.6/site-packages/openstackclient/tests/common/test_utils.pyc (13058B)
Ñò
;vVc @ s² d d k Z d d k Z d d k Z d d k l Z d d k l Z d d k l Z d Z d Z d Z
d e i f d „ ƒ YZ d e
f d
„ ƒ YZ d e i f d „ ƒ YZ d S(
iÿÿÿÿN( t
exceptions( t utilss Pa$$w0rds Wa$$p0rds dr0w$$aPt TestUtilsc B sò e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d „ Z d
„ Z d „ Z
d „ Z e i i e d
ƒ d „ ƒ Z e i i e d
ƒ d „ ƒ Z e i i e d
ƒ d „ ƒ Z d „ Z d „ Z d „ Z RS( c C sk t i d d t ƒi i ƒ zD t i ƒ } t i ƒ | _ t | i _ | i t t
i | ƒ ƒ Wd QXd S( Ns getpass.getpasst return_value( t mockt patcht PASSWORDt __exit__t __enter__t Mockt isattyt TrueR t assertEqualR t get_password( t selft
mock_stdin( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_utils.pyt test_get_password_good s
!c C s} t t t t g } t i d d | ƒi i ƒ zD t i ƒ } t i ƒ | _ t | i _
| i t t i
| ƒ ƒ Wd QXd S( Ns getpass.getpasst side_effect( R t WASSPORDt DROWSSAPR R R R R R
R R R R R
( R t answersR ( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_utils.pyt test_get_password_bad_once' s !c C sD t i ƒ } t i ƒ | _ t | i _ | i t i t i | ƒ d S( N(
R R R
t FalseR t assertRaisesR t CommandErrorR R
( R R ( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_utils.pyt test_get_password_no_tty/ s c C sn t i d d t ƒ ƒi i ƒ zD t i ƒ } t i ƒ | _ t | i _ | i t
i t i
| ƒ Wd QXd S( Ns getpass.getpassR ( R R t EOFErrorR R R R
R R R R R R R
( R R ( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_utils.pyt test_get_password_cntrl_d7 s $c C s` h d d 6d d 6} h d d 6d d 6} h d d 6d d 6} h d d 6d d 6} | | | | g S( Ni t ai t bi ( ( R t item1t item2t item3t item4( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_utils.pyt get_test_items@ s
c C sT | i ƒ } d } | d | d | d | d g } | i | t i | | ƒ ƒ d S( NR i i i i ( R" R R t
sort_items( R t itemst sort_strt expect_items( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_utils.pyt test_sort_items_with_one_keyG s "c C sT | i ƒ } d } | d | d | d | d g } | i | t i | | ƒ ƒ d S( Ns a,bi i i i ( R" R R R# ( R R$ R% R&