Ñò
ýÉªWc           @   s   d  d k  Z  d  d k l Z d  d k l Z d  d k l Z d  d k l Z d e f d „  ƒ  YZ e d j o e  i ƒ  n d S(	   iÿÿÿÿN(   t   InstallComponentCollector(   t   InstallComponentBuilder(   t   UnittestBase(   t   ComponentSelectionConfigt   InstallComponentCollectorTestc           B   sb   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z RS(
   c         C   sV   t  i |  ƒ t ƒ  |  _ t i |  i ƒ  ƒ |  i _ |  i i i ƒ  i	 ƒ  |  i _
 d  S(   N(   R   t   setUpR    t   installComponentCollectorR   t   fromJsont#   createFullComponentSelectionConfigst   fullComponentSelectionConfigt   constructInstallComponentst   resolveLeavest   fullInstallComponents(   t   self(    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyR      s    c         C   s   d  S(   N(    (   R   (    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyt.   testFilterDownstremsFromtempSelectedComponents   s    c         C   s  h d d 6d d g d 6d d g d 6} |  i  t d | d j ƒ |  i  t d | d j ƒ | i d ƒ o) t d	 „  | i d ƒ ƒ } | | d <n | i d ƒ o) t d
 „  | i d ƒ ƒ } | | d <n |  i  t d | d j ƒ |  i  t d | d j ƒ d  S(   Nt   DELTAt   modes   DEVICES/TRANSCODE/ELEMENTALs   DOWNSTREAMS/MEDIAROOMt
   TO_INSTALLs   DEVICES/QC/BATONs   DOWNSTREAMS/AMSt	   TO_DELETEc         S   s   |  i  d  ƒ S(   t   DOWNSTREAMS(   t
   startswith(   t   x(    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyt   <lambda>#   s    c         S   s   |  i  d  ƒ S(   R   (   R   (   R   (    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyR   &   s    (   t   assertEqualt   Truet   gett   filter(   R   t   preConfiguredSelectiont   to_installs(    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyt!   testFilterDownsteamsFromPreConfig   s     
c         C   s  t  ƒ  i d d d d g ƒ } h d d 6d d g d	 6d d g d
 6} |  i i | | ƒ \ } } |  i d t | i d ƒ i ƒ  ƒ ƒ |  i d t | i d ƒ i d ƒ i ƒ  ƒ ƒ |  i t | i d ƒ i d ƒ i d ƒ d  j ƒ |  i d t | i d ƒ i ƒ  ƒ ƒ |  i t | i d ƒ i d ƒ d  j ƒ |  i d t | i d ƒ i ƒ  ƒ ƒ |  i d t | i d ƒ i d ƒ i ƒ  ƒ ƒ |  i t | i d ƒ i d ƒ i d ƒ d  j ƒ |  i d t | i d ƒ i ƒ  ƒ ƒ |  i t | i d ƒ i d ƒ d  j ƒ d  S(   Ns   DEVICES/QC/BATONs   DEVICES/QC/CERIFYs   DEVICES/TRANSCODE/ENVIVIOs   DOWNSTREAMS/AMSR   R   s   DEVICES/TRANSCODE/ELEMENTALs   DOWNSTREAMS/MEDIAROOMR   R   i   t   DEVICESt	   TRANSCODEt	   ELEMENTALR   t	   MEDIAROOMt   QCt   BATONt   AMS(
   R   t   buildInstallComponentsR   t!   loadSelectionFromPreConfigurationR   t   lent   getInstallComponentByNamet   getSubComponentst   Falset   None(   R   t   installedComponentsR   t   componentsToDeletet   componentsToInstall(    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyt4   testLoadSelectionFromPreConfiguredFileUsingDeltaMode.   s,    	
%.1%(%.1%c         C   sÿ  t  ƒ  i d d d d g ƒ } h d d 6d d d d g d	 6} |  i i | | ƒ \ } } |  i d
 t | i d ƒ i ƒ  ƒ ƒ |  i d
 t | i d ƒ i d ƒ i ƒ  ƒ ƒ |  i t | i d ƒ i d ƒ i d ƒ d  j ƒ |  i d
 t | i d ƒ i ƒ  ƒ ƒ |  i t | i d ƒ i d ƒ d  j ƒ |  i d
 t | i d ƒ i ƒ  ƒ ƒ |  i d
 t | i d ƒ i d ƒ i ƒ  ƒ ƒ |  i t | i d ƒ i d ƒ i d ƒ d  j ƒ |  i d
 t | i d ƒ i ƒ  ƒ ƒ |  i t | i d ƒ i d ƒ d  j ƒ d  S(   Ns   DEVICES/QC/BATONs   DEVICES/QC/CERIFYs   DEVICES/TRANSCODE/ENVIVIOs   DOWNSTREAMS/AMSt   FULLR   s   DEVICES/TRANSCODE/ELEMENTALs   DOWNSTREAMS/MEDIAROOMR   i   R   R   R    R   R!   R"   R#   R$   (
   R   R%   R   R&   R   R'   R(   R)   R*   R+   (   R   R,   R   R-   R.   (    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyt3   testLoadSelectionFromPreConfiguredFileUsingFullModeM   s,    	%.1%(%.1%c         C   sÏ  h d d g d 6h d d 6d d d d	 g d
 6d 6h d d 6d d d g d
 6d 6h d d 6d d d d d g d
 6d 6h d d 6d g d
 6d 6h d d 6d	 6h d d 6d 6h d d 6d 6h d d 6d 6h d d 6d 6h d d 6d 6h d d 6d 6h d d 6d 6h d d 6d 6h d d 6d 6h d  d 6d! d" d# d$ d% d& g d
 6d 6h d! d 6d' g d( 6d! 6h d) d 6d" 6h d# d 6d# 6h d* d 6d$ 6h d+ d 6d% 6h d& d 6d, d' d- g d. 6d, d' g d/ 6t  d0 6d& 6h d1 d 6d2 6S(3   NR   R   t   selectionItemst   Devicest   displayNameR"   R   t
   ENCRYPTIONt   COMBINERt
   selectionsR#   t   CERIFYt   VERIFIERt
   Transcodert   ENVIVIOR    t   TITANt   RHOZETt   DIGITALRAPIDt	   Encryptort
   VERIMATRIXt   Combinert   Batont   Cerifyt   Verifiert   Enviviot	   Elementalt   Titant   Rhozett   DigitalRapidt
   Verimatrixt   DownstreamsR$   R!   t   OTTt	   MSMW_MDMSt   MSMW_OSt   XPMPs   DEVICES/COMBINERt   unAvailableComponentst	   Mediarooms   Msmw with MDMSs   Msmw with Openstreams   DEVICES/QC/VERIFIERs   DEVICES/QC/BATONt   availableComponentst   autoSelectComponentst   singleSelections   Back To Lastt   BACK(   R   (   R   (    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyR   j   s’    


c         C   s~   h d d 6h d d 6h d d 6h d d 6h d d 6g d 6h d d 6h d	 d 6g d 6g d 6h d
 d 6h d d 6g d 6g d 6S(   Nt   ROOTt   componentNameR   R"   R#   R8   t   subComponentsR   R    R   R$   (    (   R   (    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyt   createPartialInstallComponentsô   s    c         C   sø   t  ƒ  i d d d g ƒ } |  i i i | ƒ i ƒ  } |  i i | | ƒ } |  i d t | i	 d ƒ i
 ƒ  ƒ ƒ |  i d t | i	 d ƒ i	 d ƒ i
 ƒ  ƒ ƒ |  i d t | i	 d ƒ i	 d ƒ i	 d ƒ i
 ƒ  ƒ ƒ |  i t | i	 d	 ƒ d  j ƒ d  S(
   Ns   DOWNSTREAMS/XPMPs   DEVICES/QC/VERIFIERs   DEVICES/COMBINERi   R   R"   i    R#   R   (   R   R%   R   R   t	   substractt'   removeNonLeafComponentIfNoSubcomponentst*   resolveAvailalbeComponentsWithDependenciesR   R'   R(   R)   R   R+   (   R   R,   t   availableInstallComponents(    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyt.   testResolveAvailalbeComponentsWithDependencies  s    	%.7c         C   s‘   t  ƒ  i d d d g ƒ } |  i i i | ƒ i ƒ  } |  i i | | ƒ |  i d t | i	 d ƒ i
 ƒ  ƒ ƒ |  i t | i	 d ƒ d  j ƒ d  S(   Ns   DOWNSTREAMS/XPMPs   DEVICES/QC/VERIFIERs   DEVICES/COMBINERi   R   R   (   R   R%   R   R   RZ   R[   t   resolveSingleSelectionR   R'   R(   R)   R   R+   (   R   R,   R]   (    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyt   testResolveSingleSelection  s    	%c         C   s   |  i  i d d ƒ d  S(   Nt
   componentss   ..\Upgrade\1.0-2.0(   R   t)   collectAllUpgradeComponentsViaDirectories(   R   (    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyt.   xtestCollectAllUpgradeComponentsViaDirectories#  s    (   t   __name__t
   __module__R   R   R   R/   R1   R   RY   R^   R`   Rc   (    (    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyR      s   						Š			t   __main__(   t   unittestR    R   R   R   R   Rd   t   main(    (    (    sw   /home/jenkins/workspace/prepack-aio-release-4.2/prepack-aio/src/main/resources/scripts/InstallComponentCollectorTest.pyt   <module>   s   ÿ !