#NEWLINE# def test_trigger_types_are_registered_on_start( self ) : #NEWLINE# #INDENT# timer = St2Timer ( ) #NEWLINE# timer . _scheduler = mock . Mock ( ) #NEWLINE# self . assertItemsEqual ( TriggerType . get_all ( ) , [ ] ) #NEWLINE# timer . start ( ) #NEWLINE# trigger_type_dbs = TriggerType . get_all ( ) #NEWLINE# self . assertEqual ( len ( trigger_type_dbs ) , len ( TIMER_TRIGGER_TYPES ) ) #NEWLINE# timer_trigger_type_refs = TIMER_TRIGGER_TYPES . keys ( ) #NEWLINE# for trigger_type in trigger_type_dbs : #NEWLINE# #INDENT# ref = ResourceReference ( pack = trigger_type . pack , name = trigger_type . name ) . ref #NEWLINE# self . assertTrue ( ( ref in timer_trigger_type_refs ) )