func (s *simplestreamsSuite) TestConstraint(c *gc.C) {
	constraint := gui.NewConstraint("test-stream", 42)
	c.Assert(constraint.IndexIds(), jc.DeepEquals, []string{"com.canonical.streams:test-stream:gui"})

	ids, err := constraint.ProductIds()
	c.Assert(err, jc.ErrorIsNil)
	c.Assert(ids, jc.DeepEquals, []string{"com.canonical.streams:gui"})

	c.Assert(constraint.Arches, jc.DeepEquals, []string{})
	c.Assert(constraint.Series, jc.DeepEquals, []string{})

	c.Assert(constraint.Endpoint, gc.Equals, "")
	c.Assert(constraint.Region, gc.Equals, "")
	c.Assert(constraint.Stream, gc.Equals, "test-stream")
}
	"github.com/juju/juju/juju"
	coretesting "github.com/juju/juju/testing"
	jujuversion "github.com/juju/juju/version"
)

type simplestreamsSuite struct {
	sstesting.LocalLiveSimplestreamsSuite
}

var _ = gc.Suite(&simplestreamsSuite{
	LocalLiveSimplestreamsSuite: sstesting.LocalLiveSimplestreamsSuite{
		Source:          simplestreams.NewURLDataSource("test", "test:", utils.VerifySSLHostnames, simplestreams.DEFAULT_CLOUD_DATA, false),
		RequireSigned:   false,
		DataType:        gui.DownloadType,
		StreamsVersion:  gui.StreamsVersion,
		ValidConstraint: gui.NewConstraint(gui.ReleasedStream, 2),
	},
})

func (s *simplestreamsSuite) SetUpSuite(c *gc.C) {
	s.LocalLiveSimplestreamsSuite.SetUpSuite(c)
	sstesting.TestRoundTripper.Sub = coretesting.NewCannedRoundTripper(
		guiData, map[string]int{"test://unauth": http.StatusUnauthorized})
}

func (s *simplestreamsSuite) TearDownSuite(c *gc.C) {
	sstesting.TestRoundTripper.Sub = nil
	s.LocalLiveSimplestreamsSuite.TearDownSuite(c)
}

func (s *simplestreamsSuite) TestNewDataSource(c *gc.C) {