<s> import os <EOL> from datetime import datetime , timedelta <EOL> from django . test import TestCase <EOL> from django . test . client import Client <EOL> from django . contrib . auth . models import User <EOL> from django . core . exceptions import ValidationError <EOL> from django . core . urlresolvers import reverse <EOL> from django . db import connection <EOL> from app import tests <EOL> from error . models import Error , Group <EOL> from stats . utils import count <EOL> class StatsTests ( TestCase ) : <EOL> def setUp ( self ) : <EOL> for error in Error . all ( ) : error . delete ( ) <EOL> def testCount ( self ) : <EOL> for x in range ( <NUM_LIT:0> , <NUM_LIT> ) : <EOL> Error ( ) . save ( dont_send_signals = True ) <EOL> assert count ( ) == <NUM_LIT> <EOL> for x in range ( <NUM_LIT:0> , <NUM_LIT:5> ) : <EOL> err = Error ( dont_send_signals = True ) <EOL> err . priority = <NUM_LIT:4> <EOL> err . save ( ) <EOL> assert count ( [ "<STR_LIT>" , <NUM_LIT:4> ] ) == <NUM_LIT:5> <EOL> assert count ( [ "<STR_LIT>" , None ] ) == <NUM_LIT> <EOL> assert count ( ) == <NUM_LIT> </s>
