def testCanonicalIncludesDateParam(self): s = ImageSetDesc(graph1, None, "/set?date=2010-11-20") self.assertEqual(s.canonicalSetUri(), SITE["set?date=2010-11-20"])
def testCanonicalIncludesDirParam(self): s = ImageSetDesc(graph1, None, "/set?dir=http%3A%2F%2Fexample.com%2Fd1¤t=foo") self.assertEqual(s.canonicalSetUri(), SITE["set?dir=http%3A%2F%2Fexample.com%2Fd1"])
def testCanonicalIncludesStarParam(self): s = ImageSetDesc(graph1, None, "/set?dir=http%3A%2F%2Fexample.com%2Fd1&star=only") self.assertEqual( s.canonicalSetUri(), SITE["set?dir=http%3A%2F%2Fexample.com%2Fd1&star=only"])
def testCanonicalOmitsCurrentParam(self): s = ImageSetDesc(graph1, None, "/set?tag=t¤t=foo") self.assertEqual(s.canonicalSetUri(), SITE["set?tag=t"])
def testCanonicalIncludesStarParam(self): s = ImageSetDesc(graph1, None, "/set?dir=http%3A%2F%2Fexample.com%2Fd1&star=only") self.assertEqual(s.canonicalSetUri(), SITE["set?dir=http%3A%2F%2Fexample.com%2Fd1&star=only"])