<s> '''<STR_LIT>''' <EOL> from django . db import models <EOL> from django . db . models . signals import pre_delete <EOL> from expedient . clearinghouse . resources . models import Resource <EOL> from expedient . clearinghouse . aggregate . models import Aggregate <EOL> from expedient . clearinghouse . slice . models import Slice <EOL> class DummyAggregate ( Aggregate ) : <EOL> def create_resources ( self ) : <EOL> for i in xrange ( <NUM_LIT:1> , <NUM_LIT:4> ) : <EOL> DummyResource . objects . create ( <EOL> name = "<STR_LIT>" % ( self . id , i ) , <EOL> aggregate = self ) <EOL> def stop_slice ( self , slice ) : <EOL> super ( DummyAggregate , self ) . stop_slice ( slice ) <EOL> DummySliceEvent . objects . get_or_create ( <EOL> slice = "<STR_LIT:%s>" % slice , <EOL> status = "<STR_LIT>" , <EOL> aggregate = "<STR_LIT:%s>" % self , <EOL> ) <EOL> class DummyResource ( Resource ) : pass <EOL> class DummySliceEvent ( models . Model ) : <EOL> slice = models . TextField ( ) <EOL> status = models . TextField ( ) <EOL> aggregate = models . TextField ( ) <EOL> def slice_deleted ( sender , ** kwargs ) : <EOL> slice = kwargs [ "<STR_LIT>" ] <EOL> DummySliceEvent . objects . create ( <EOL> slice = "<STR_LIT:%s>" % slice , <EOL> status = "<STR_LIT>" , <EOL> ) <EOL> pre_delete . connect ( slice_deleted , Slice ) </s>
