func (s *UnsetSuite) TestInit(c *gc.C) { unsetCmd := model.NewUnsetCommandForTest(s.fake) // Only empty is a problem. err := testing.InitCommand(unsetCmd, []string{}) c.Assert(err, gc.ErrorMatches, "no keys specified") // Everything else is fine. err = testing.InitCommand(unsetCmd, []string{"something", "weird"}) c.Assert(err, jc.ErrorIsNil) }
func (s *UnsetSuite) run(c *gc.C, args ...string) (*cmd.Context, error) { command := model.NewUnsetCommandForTest(s.fake) return testing.RunCommand(c, command, args...) }