#NEWLINE# def test_make_new( self ) : #NEWLINE# #INDENT# sot = sample . Sample ( SAMPLE ) #NEWLINE# self . assertEqual ( SAMPLE [ 'sample_id' ] , sot . id ) #NEWLINE# self . assertEqual ( SAMPLE [ 'metadata' ] , sot . metadata ) #NEWLINE# self . assertEqual ( SAMPLE [ 'counter_name' ] , sot . counter_name ) #NEWLINE# self . assertEqual ( SAMPLE [ 'project_id' ] , sot . project_id ) #NEWLINE# dt = datetime . datetime ( 2015 , 3 , 9 , 12 , 15 , 57 , 233772 ) . replace ( tzinfo = None ) #NEWLINE# self . assertEqual ( dt , sot . recorded_at . replace ( tzinfo = None ) ) #NEWLINE# self . assertEqual ( SAMPLE [ 'resource_id' ] , sot . resource_id ) #NEWLINE# self . assertEqual ( SAMPLE [ 'source' ] , sot . source ) #NEWLINE# dt = datetime . datetime ( 2015 , 3 , 9 , 12 , 15 , 57 , 233772 ) . replace ( tzinfo = None ) #NEWLINE# self . assertEqual ( dt , sot . generated_at . replace ( tzinfo = None ) ) #NEWLINE# self . assertEqual ( SAMPLE [ 'type' ] , sot . type ) #NEWLINE# self . assertEqual ( SAMPLE [ 'unit' ] , sot . unit ) #NEWLINE# self . assertEqual ( SAMPLE [ 'user_id' ] , sot . user_id ) #NEWLINE# self . assertEqual ( SAMPLE [ 'volume' ] , sot . volume )