#NEWLINE# def test_simple_timeline( self ) : #NEWLINE# #INDENT# from . sequere_registry import JoinAction , User #NEWLINE# from sequere.contrib.timeline import Timeline #NEWLINE# timeline = Timeline ( self . user ) #NEWLINE# timeline . save ( JoinAction ( self . user ) ) #NEWLINE# self . assertEqual ( timeline . get_private_count ( ) , 1 ) #NEWLINE# self . assertEqual ( timeline . get_public_count ( ) , 1 ) #NEWLINE# self . assertEqual ( timeline . get_public_count ( action = 'join' ) , 1 ) #NEWLINE# self . assertEqual ( timeline . get_private_count ( action = 'join' ) , 1 ) #NEWLINE# self . assertEqual ( timeline . get_private_count ( action = JoinAction ) , 1 ) #NEWLINE# self . assertEqual ( timeline . get_public_count ( action = JoinAction ) , 1 ) #NEWLINE# self . assertEqual ( timeline . get_private_count ( target = self . user ) , 1 ) #NEWLINE# self . assertEqual ( timeline . get_private_count ( target = User ) , 1 ) #NEWLINE# self . assertEqual ( timeline . get_public_count ( target = self . user ) , 1 ) #NEWLINE# self . assertEqual ( timeline . get_public_count ( target = User ) , 1 ) #NEWLINE# qs = timeline . get_private ( ) #NEWLINE# self . assertEqual ( qs . count ( ) , 1 ) #NEWLINE# results = qs . all ( ) #NEWLINE# self . assertEqual ( len ( results ) , 1 ) #NEWLINE# qs = timeline . get_public ( ) #NEWLINE# self . assertEqual ( qs . count ( ) , 1 ) #NEWLINE# results = qs . all ( ) #NEWLINE# self . assertEqual ( len ( results ) , 1 )