<s> from django . core import management <EOL> from django . test import TestCase <EOL> from . models import Article , Book <EOL> class SampleTestCase ( TestCase ) : <EOL> fixtures = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> def testClassFixtures ( self ) : <EOL> "<STR_LIT>" <EOL> self . assertEqual ( Article . objects . count ( ) , <NUM_LIT:3> ) <EOL> self . assertQuerysetEqual ( <EOL> Article . objects . all ( ) , [ <EOL> u"<STR_LIT>" , <EOL> u"<STR_LIT>" , <EOL> u"<STR_LIT>" , <EOL> ] , <EOL> lambda a : a . headline <EOL> ) <EOL> class FixtureTestCase ( TestCase ) : <EOL> def test_initial_data ( self ) : <EOL> "<STR_LIT>" <EOL> self . assertQuerysetEqual ( <EOL> Book . objects . all ( ) , [ <EOL> u'<STR_LIT>' <EOL> ] , <EOL> lambda a : a . name <EOL> ) <EOL> def test_loaddata ( self ) : <EOL> "<STR_LIT>" <EOL> management . call_command ( "<STR_LIT>" , "<STR_LIT>" , verbosity = <NUM_LIT:0> , commit = False ) <EOL> self . assertQuerysetEqual ( <EOL> Article . objects . all ( ) , [ <EOL> u"<STR_LIT>" , <EOL> u"<STR_LIT>" , <EOL> ] , <EOL> lambda a : a . headline , <EOL> ) <EOL> management . call_command ( "<STR_LIT>" , "<STR_LIT>" , verbosity = <NUM_LIT:0> , commit = False ) <EOL> self . assertQuerysetEqual ( <EOL> Article . objects . all ( ) , [ <EOL> u"<STR_LIT>" , <EOL> u"<STR_LIT>" , <EOL> u"<STR_LIT>" , <EOL> ] , <EOL> lambda a : a . headline , <EOL> ) <EOL> management . call_command ( "<STR_LIT>" , "<STR_LIT>" , verbosity = <NUM_LIT:0> , commit = False ) <EOL> self . assertQuerysetEqual ( <EOL> Article . objects . all ( ) , [ <EOL> u"<STR_LIT>" , <EOL> u"<STR_LIT>" , <EOL> u"<STR_LIT>" , <EOL> ] , <EOL> lambda a : a . headline , <EOL> ) </s>
