<s> from StringIO import StringIO <EOL> from django . test import TestCase <EOL> from django . core import management <EOL> from django . core . management . base import CommandError <EOL> class CommandTests ( TestCase ) : <EOL> def test_command ( self ) : <EOL> out = StringIO ( ) <EOL> management . call_command ( '<STR_LIT>' , stdout = out ) <EOL> self . assertEquals ( out . getvalue ( ) , <EOL> "<STR_LIT>" ) <EOL> def test_command_style ( self ) : <EOL> out = StringIO ( ) <EOL> management . call_command ( '<STR_LIT>' , style = '<STR_LIT>' , stdout = out ) <EOL> self . assertEquals ( out . getvalue ( ) , <EOL> "<STR_LIT>" ) <EOL> def test_explode ( self ) : <EOL> self . assertRaises ( CommandError , management . call_command , ( '<STR_LIT>' , ) ) </s>
