﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23663	Commands classes are not properly testable due to their initialization in execute() method!	Davide Zanotti	nobody	"I was writing a series of tests for a custom command, but I get:

'''AttributeError: 'Command' object has no attribute 'stderr''''''''

I realized that the problem is that references to ""stderr"" and ""stdout"" are initialized in the execute() method!
This makes commands classes untestable, or better, I can write tests but tests that are not unitary, this is against the principles of TDD, I should not run a command to test it, instead I should write tests for each single little piece of logic that makes my command do the job.

Please, move initialization logic into __init__ so we can test commands methods separately.
"	Cleanup/optimization	closed	Core (Management commands)	1.7	Normal	fixed	test, tdd, management, commands	Loic Bistuer berker.peksag@…	Ready for checkin	1	0	0	0	0	0
