Fix tests for factory methods.

Due to the way the factory tests were being set up, they were not being run properly. This pull request fixes that.

The problem was being caused by the factory being constructed during test setup. Since the gocheck.C object from the test setup method was being passed on to the factory, failed assertions in factory methods were not being properly handled. A gist that demonstrates this can be found here: https://gist.github.com/tasdomas/649ecf86ba43e4cd4b36

This resulted in some code being broken, but not immediately obviously so. Because of that some changes in this PR are there to make the now functional factory tests pass.
Thanks for explaining. But I don't think we should set the series to a
version of ubuntu which is no longer supported.


On Tue, Aug 5, 2014 at 5:52 PM, Domas Monkus <notifications@github.com>
wrote:

> In testing/factory/factory.go:
>
> > @@ -123,7 +137,7 @@ func (factory *Factory) MakeMachine(vParams ...MachineParams) *state.Machine {
> >  		panic("expecting 1 parameter or none")
> >  	}
> >  	if params.Series == "" {
> > -		params.Series = "trusty"
> > +		params.Series = "quantal"
>
> Because MakeUnit was failing when the default service (created by
> MakeService()) had a different series to the default machine (created by
> MakeMachine()).
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/juju/juju/pull/464/files#r15798905>.
>