<s> from datetime import datetime <EOL> from uuid import UUID <EOL> from changes . api . serializer import serialize <EOL> from changes . models . log import LogSource , LogChunk <EOL> def test_simple ( ) : <EOL> logchunk = LogChunk ( <EOL> id = UUID ( hex = '<STR_LIT>' ) , <EOL> source_id = UUID ( hex = '<STR_LIT>' ) , <EOL> source = LogSource ( id = UUID ( hex = '<STR_LIT>' ) ) , <EOL> offset = <NUM_LIT:10> , <EOL> size = <NUM_LIT:7> , <EOL> text = '<STR_LIT>' , <EOL> date_created = datetime ( <NUM_LIT> , <NUM_LIT:9> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:15> , <NUM_LIT> ) , <EOL> ) <EOL> result = serialize ( logchunk ) <EOL> assert result [ '<STR_LIT:id>' ] == '<STR_LIT>' <EOL> assert result [ '<STR_LIT:source>' ] [ '<STR_LIT:id>' ] == '<STR_LIT>' <EOL> assert result [ '<STR_LIT:text>' ] == '<STR_LIT>' <EOL> assert result [ '<STR_LIT:size>' ] == <NUM_LIT:7> <EOL> assert result [ '<STR_LIT>' ] == <NUM_LIT:10> </s>
