/usr/lib/python2.6/site-packages/openstackclient/tests/common
Edit: /usr/lib/python2.6/site-packages/openstackclient/tests/common/test_quota.pyc (4414B)
Ñò
;vVc @ s” d d k Z d d k Z d d k l Z d d k l Z d d k l Z d e i f d „ ƒ YZ d e i
f d „ ƒ YZ d e f d „ ƒ YZ d S(
iÿÿÿÿN( t quota( t fakest FakeQuotaResourcec B s0 e Z h d d 6Z d „ Z d „ Z d „ Z RS( t valuet propertyc C s | i i | ƒ d S( N( t _keyst update( t selft args( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_quota.pyt set_keys s c C s( x! | D] } | i i | d ƒ q Wd S( N( R t popt None( R t keyst key( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_quota.pyt
unset_keys s c C s | i S( N( R ( R ( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_quota.pyt get_keys! s ( t __name__t
__module__R R R R ( ( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_quota.pyR s
t TestQuotac B s e Z d „ Z RS( c C s| t t | ƒ i ƒ | i i i i | _ | i i ƒ t i
ƒ } t i
ƒ | _ | | i i _ | i | _ | i i ƒ d S( N(
t superR t setUpt appt client_managert computet quotast quotas_mockt
reset_mockt mockt Mockt volumet volume_quotas_mock( R t volume_mock( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_quota.pyR ' s
( R R R ( ( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_quota.pyR % s t TestQuotaSetc B s# e Z d „ Z d „ Z d „ Z RS( c C s× t t | ƒ i ƒ t d t i t i ƒ d t ƒ| i
i _ t d t i t i ƒ d t ƒ| i
i
_ t d t i t i ƒ d t ƒ| i i _ t d t i t i ƒ d t ƒ| i i
_ t i | i d ƒ | _ d S( Nt loaded( R R R R R t copyt deepcopyt
compute_fakest QUOTAt TrueR t findt return_valueR R R t SetQuotaR t cmd( R ( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_quota.pyR 4 s$ c C sú d t t i ƒ d t t i ƒ d t t i ƒ d t t i ƒ t i g } d t i f d t i f d t i f d t i f d t i f g } | i | i | | ƒ } | i i | ƒ h t i d 6t i d 6t i d 6t i d 6} | i
i i d
| d S( Ns --floating-ipss --fixed-ipss --injected-filess --key-pairst floating_ipst fixed_ipst injected_filest key_pairst projectt project_test(
t strR$ t floating_ip_numt
fix_ip_numt injected_file_numt key_pair_numt project_namet check_parserR* t take_actionR R t assert_called_with( R t arglistt
verifylistt parsed_argst kwargs( ( sW /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/common/test_quota.pyt test_quota_setQ s$
c C sÉ d t t i ƒ d t t i ƒ d t t i ƒ t i g } d t i f d t i f d t i f g } | i | i | | ƒ } | i i | ƒ h t i d 6t i d 6t i d 6} | i i
i d | d S( Ns --gigabytess --snapshotss --volumest gigabytest snapshotst volumesR0 ( R1 R$ R2 R3 R4 R6 R7 R* R8 R R R9 ( R R: R; R<