ģō
õ0·Fc           @   sĒ   d  d k  Z  d  d k Z d  d k Z d  d k l Z l Z d  d k l Z d  d k l Z d  d k	 l	 Z	 e i
 i d d d d	  Z d
 e  i f d     YZ d S(   iĸĸĸĸN(   t   configt   opml(   t   split(   t   glob(   t   ConfigParsert   testst   workR    t   cachet   ReadingListTestc           B   s5   e  Z d    Z d   Z d   Z d   Z d   Z RS(   c         C   s   t  i d  d  S(   Ns   tests/data/config/rlist.ini(   R    t   load(   t   self(    (    s.   /home/sgala/newcode/venus/tests/test_rlists.pyt   setUp   s    c         C   s.   t  i t  t i t i i t  d  d  S(   Ni    (   t   shutilt   rmtreet   workdirt   ost
   removedirst   pathR   (   R
   (    (    s.   /home/sgala/newcode/venus/tests/test_rlists.pyt   tearDown   s    c         C   s[   g  } t  i   D] } | t |  d q ~ } | i   |  i d d d d g |  d  S(   Ni   s   testfeed0.atoms   testfeed1a.atoms   testfeed2.atoms   testfeed3.rss(   R    t   subscriptionsR   t   sortt   assertEqual(   R
   t   _[1]t   feedt   feeds(    (    s.   /home/sgala/newcode/venus/tests/test_rlists.pyt
   test_feeds   s    1
c         C   s   t  g  } t i   D] } | t |  d | f q ~  } | d } |  i d t i |  d  | d } |  i d t i |  d  d  S(   Ni   s   testfeed1a.atomt   onet   names   testfeed2.atomt   two(   t   dictR    R   R   R   t   feed_options(   R
   R   R   R   t   feed1t   feed2(    (    s.   /home/sgala/newcode/venus/tests/test_rlists.pyt   test_feed_options   s
    =

c         C   sŽ   t  t i i t d d   } |  i d t |   t   } | i | d  g  } | i	   D] } | t
 |  d q_ ~ } | i   |  i d d d d d	 g |  d  S(
   Nt   listst   *i   i    s   opml.xmls   testfeed0.atoms   testfeed1a.atoms   testfeed2.atoms   testfeed3.rss(   R   R   R   t   joinR   R   t   lenR   t   readt   sectionsR   R   (   R
   R   t   parserR   R   R   (    (    s.   /home/sgala/newcode/venus/tests/test_rlists.pyt
   test_cache'   s    	1
(   t   __name__t
   __module__R   R   R   R!   R)   (    (    (    s.   /home/sgala/newcode/venus/tests/test_rlists.pyR      s
   				
(   t   unittestR   R   t   planetR    R   t   os.pathR   R   R   R   R$   R   t   TestCaseR   (    (    (    s.   /home/sgala/newcode/venus/tests/test_rlists.pys   <module>   s   $
