
    j
                     T    d dl Zd dlmc mZ d dlZd dlmZm	Z	m
Z
 d Zd Zd Zd ZdS )    N)ContentBriefcreate_content_briefvalidate_content_briefc                     t          dddd          } t          | t                    }|sddt          j                    v st          j        t                    rt          j        t                    nddt          j                    v st          j        |           rt          j        |           ndd	t          j                    v st          j        t                    rt          j        t                    nd	t          j        |          d
z  }t          t          j	        |                    d }| j
        }d}||k    }|st          j        d|fd||f          dt          j                    v st          j        |           rt          j        |           ndt          j        |          t          j        |          dz  }dd|iz  }t          t          j	        |                    d x}x}}| j        }d}||k    }|st          j        d|fd||f          dt          j                    v st          j        |           rt          j        |           ndt          j        |          t          j        |          dz  }dd|iz  }t          t          j	        |                    d x}x}}| j        }d}||k    }|st          j        d|fd||f          dt          j                    v st          j        |           rt          j        |           ndt          j        |          t          j        |          dz  }dd|iz  }t          t          j	        |                    d x}x}}| j        }|j        }d} ||          }|sddt          j                    v st          j        |           rt          j        |           ndt          j        |          t          j        |          t          j        |          t          j        |          dz  }	t          t          j	        |	                    d x}x}x}}d}
| j        }|
|v }|st          j        d|fd|
|f          t          j        |
          dt          j                    v st          j        |           rt          j        |           ndt          j        |          dz  }dd|iz  }t          t          j	        |                    d x}
x}}d}
| j        }|
|v }|st          j        d|fd|
|f          t          j        |
          dt          j                    v st          j        |           rt          j        |           ndt          j        |          dz  }dd|iz  }t          t          j	        |                    d x}
x}}d}
| j        }|
|v }|st          j        d|fd|
|f          t          j        |
          dt          j                    v st          j        |           rt          j        |           ndt          j        |          dz  }dd|iz  }t          t          j	        |                    d x}
x}}d}
| j        }|
|v }|st          j        d|fd|
|f          t          j        |
          dt          j                    v st          j        |           rt          j        |           ndt          j        |          dz  }dd|iz  }t          t          j	        |                    d x}
x}}| j        }d }||k    }|st          j        d|fd!||f          dt          j                    v st          j        |           rt          j        |           ndt          j        |          t          j        |          dz  }dd|iz  }t          t          j	        |                    d x}x}}| j        }d"}||k    }|st          j        d|fd#||f          dt          j                    v st          j        |           rt          j        |           ndt          j        |          t          j        |          dz  }dd|iz  }t          t          j	        |                    d x}x}}d S )$Nai_life_systemsAI weekly review routinez4I use AI tools but still lose control of priorities.z>a 10-minute Sunday review that keeps AI as assistant, not boss	pillar_idtopicaudience_problempayoffz5assert %(py4)s
{%(py4)s = %(py0)s(%(py1)s, %(py2)s)
}
isinstancebriefr   )py0py1py2py4z(ai_life_systems-ai-weekly-review-routine)==)z0%(py2)s
{%(py2)s = %(py0)s.brief_id
} == %(py5)sr   r   py5assert %(py7)spy7)z1%(py2)s
{%(py2)s = %(py0)s.pillar_id
} == %(py5)s)z-%(py2)s
{%(py2)s = %(py0)s.topic
} == %(py5)szI use AI toolszrassert %(py8)s
{%(py8)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.audience_problem
}.startswith
}(%(py6)s)
})r   r   r   py6py8z10-minute Sunday reviewin)z.%(py1)s in %(py5)s
{%(py5)s = %(py3)s.payoff
}r   py3r   zAI as a servant)z3%(py1)s in %(py5)s
{%(py5)s = %(py3)s.positioning
}human remains in control)z4%(py1)s in %(py5)s
{%(py5)s = %(py3)s.visual_rules
}fake earnings)z-%(py1)s in %(py5)s
{%(py5)s = %(py3)s.no_go
}#   )z?%(py2)s
{%(py2)s = %(py0)s.target_duration_seconds
} == %(py5)s)youtubetiktok	instagram)z1%(py2)s
{%(py2)s = %(py0)s.platforms
} == %(py5)s)r   r   r   @py_builtinslocals
@pytest_ar_should_repr_global_name	_safereprAssertionError_format_explanationbrief_id_call_reprcomparer
   r   r   
startswithr   positioningvisual_rulesno_gotarget_duration_seconds	platforms)r   @py_assert3@py_format5@py_assert1@py_assert4@py_format6@py_format8@py_assert5@py_assert7@py_format9@py_assert0@py_assert2s               R/home/agent/jarvis_runtime/autoshortsbot/AutoShortsBot/tests/test_content_brief.py7test_create_content_brief_from_default_pillar_and_topicr@      s	    #(OO	  E e\***************:*****:*************e*****e*************\*****\************************>GGG>GGGGGGGGGGG>GGGGGGGGGGGGG5GGGGG5GGGGGG>GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG?///?///////////?/////////////5/////5//////?////////////////////////////////;444;44444444444;44444444444445444445444444;44444444444444444444444444444444!>!,>-=>,,-=>>>>>>>>>>>>>>>5>>>>>5>>>>>>!>>>>,>>>>-=>>>>>>>>>>>>>>>>>>>>>>>>>>>>$44$4444444444$44444$44444444444444444444444444444444444444444444444441 11 11111111111 1111111111111111111111111111 1111111111111111111111111111%;);;%);;;;;;;;;;;%);;;;;;%;;;;;;;;;;;;;;;;;;;;;;);;;;;;;;;;;;;;;;;;;;;;;;;;;;)ek)?k))))))))))?k)))))?)))))))))))e)))))e))))))k)))))))))))))))))))))))))))(.B.(B..........(B............5.....5......(....B...........................?@@@?@@@@@@@@@@@?@@@@@@@@@@@@@5@@@@@5@@@@@@?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    c                      t          j        t          d          5  t          dddd           d d d            d S # 1 swxY w Y   d S )Nzunknown pillar)matchunknownr   AI tools create noise.one weekly control checkpointr	   )pytestraises
ValueErrorr    rA   r?   0test_create_content_brief_rejects_unknown_pillarrK      s    	z)9	:	:	: 
 
,52		
 	
 	
 	

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
s   =AAc                  P   t          dddddddddd	d
          } t          |           }|j        }d}||u }|st          j        d|fd||f          dt          j                    v st          j        |          rt          j        |          ndt          j        |          t          j        |          dz  }dd|iz  }t          t          j
        |                    d x}x}}d}|j        }||v }|st          j        d|fd||f          t          j        |          dt          j                    v st          j        |          rt          j        |          ndt          j        |          dz  }dd|iz  }t          t          j
        |                    d x}x}}d}|j        }||v }|st          j        d|fd||f          t          j        |          dt          j                    v st          j        |          rt          j        |          ndt          j        |          dz  }dd|iz  }t          t          j
        |                    d x}x}}d}|j        }||v }|st          j        d|fd||f          t          j        |          dt          j                    v st          j        |          rt          j        |          ndt          j        |          dz  }dd|iz  }t          t          j
        |                    d x}x}}d S )Nbadr     zHAI as a servant for ordinary life systems, never as values or authority.)clear)r   )r    )r"   r!   )r,   r
   r   r   r   r/   toner0   r1   r3   r2   Fisz0%(py2)s
{%(py2)s = %(py0)s.is_valid
} is %(py5)sresultr   r   r   ztopic is requiredr   z.%(py1)s in %(py5)s
{%(py5)s = %(py3)s.errors
}r   zaudience_problem is requiredzpayoff is required)r   r   is_validr'   r-   r%   r&   r(   r)   r*   r+   errors	r   rU   r6   r7   r4   r8   r9   r=   r>   s	            r?   ;test_validate_content_brief_rejects_missing_strategy_fieldsrZ   %   s   #^2  "  E $E**F?#e#?e##########?e############6#####6######?####e###########################/&-/-//////////-////////////////&/////&//////-///////////////////////////):V]:)]::::::::::)]:::::):::::::::::V:::::V::::::]:::::::::::::::::::::::::::06=0=0000000000=00000000000000006000006000000=00000000000000000000000000000rA   c                     t          dddddd          } t          |           }|j        }d}||u }|st          j        d	|fd
||f          dt          j                    v st          j        |          rt          j        |          ndt          j        |          t          j        |          dz  }dd|iz  }t          t          j
        |                    d x}x}}d}|j        }||v }|st          j        d|fd||f          t          j        |          dt          j                    v st          j        |          rt          j        |          ndt          j        |          dz  }dd|iz  }t          t          j
        |                    d x}x}}d}|j        }||v }|st          j        d|fd||f          t          j        |          dt          j                    v st          j        |          rt          j        |          ndt          j        |          dz  }dd|iz  }t          t          j
        |                    d x}x}}d S )Nr   r   rE   rF   )linkedin	   )r
   r   r   r   r3   r2   FrR   rT   rU   r   r   r   z+duration_seconds must be between 10 and 180r   rV   r   zunsupported platform: linkedin)r   r   rW   r'   r-   r%   r&   r(   r)   r*   r+   rX   rY   s	            r?   >test_validate_content_brief_rejects_bad_duration_and_platformsr^   <   s    #(1. !  E $E**F?#e#?e##########?e############6#####6######?####e###########################8IFMI8MIIIIIIIIII8MIIIII8IIIIIIIIIIIFIIIIIFIIIIIIMIIIIIIIIIIIIIIIIIIIIIIIIIII+<v}<+}<<<<<<<<<<+}<<<<<+<<<<<<<<<<<v<<<<<v<<<<<<}<<<<<<<<<<<<<<<<<<<<<<<<<<<<<rA   )builtinsr%   _pytest.assertion.rewrite	assertionrewriter'   rG   autoshorts.content.briefr   r   r   r@   rK   rZ   r^   rJ   rA   r?   <module>rd      s                  _ _ _ _ _ _ _ _ _ _A A A*
 
 
1 1 1.= = = = =rA   