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.
c'mmon, good boy scouts always leave the camp ground cleaner than they
leave it.


On Tue, Aug 5, 2014 at 6:08 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"
>
> In that case, github.com/juju/charm/testing/repo should be updated,
> because that's what the factory uses to create services. I did not want to
> do that for two reasons:
> 1. lots of changes all over the code
> 2. probability of unintended consequences
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/juju/juju/pull/464/files#r15799406>.
>