<s> from datetime import date <EOL> import factory <EOL> from kitsune . kpi . models import MetricKind , Metric <EOL> from kitsune . sumo . tests import FuzzyUnicode <EOL> class MetricKindFactory ( factory . DjangoModelFactory ) : <EOL> class Meta : <EOL> model = MetricKind <EOL> code = FuzzyUnicode ( ) <EOL> class MetricFactory ( factory . DjangoModelFactory ) : <EOL> class Meta : <EOL> model = Metric <EOL> start = date ( <NUM_LIT> , <NUM_LIT:2> , <NUM_LIT:16> ) <EOL> end = date ( <NUM_LIT> , <NUM_LIT:2> , <NUM_LIT> ) <EOL> value = <NUM_LIT> <EOL> kind = factory . SubFactory ( MetricKindFactory ) </s>
