Example #1
0
    def test_slugify(self):
        tag = EventTag(name=u"with space", slug=u"")
        tag.clean()
        self.assertEqual(tag.name, "with space")
        self.assertEqual(tag.slug, "with-space")

        tag = EventTag(name=u"with&ampersand")
        tag.clean()
        self.assertEqual(tag.name, "with&ampersand")
        self.assertEqual(tag.slug, "withampersand")

        tag = EventTag(name=u"with?questionmark")
        tag.clean()
        self.assertEqual(tag.name, "with?questionmark")
        self.assertEqual(tag.slug, "withquestionmark")

        tag = EventTag(name=u"with#hash")
        tag.clean()
        self.assertEqual(tag.name, "with#hash")
        self.assertEqual(tag.slug, "withhash")
Example #2
0
    def test_slugify(self):
        tag = EventTag(name=u"with space", slug=u"")
        tag.clean()
        self.assertEqual(tag.name, "with space")
        self.assertEqual(tag.slug, "with-space")

        tag = EventTag(name=u"with&ampersand")
        tag.clean()
        self.assertEqual(tag.name, "with&ampersand")
        self.assertEqual(tag.slug, "withampersand")

        tag = EventTag(name=u"with?questionmark")
        tag.clean()
        self.assertEqual(tag.name, "with?questionmark")
        self.assertEqual(tag.slug, "withquestionmark")

        tag = EventTag(name=u"with#hash")
        tag.clean()
        self.assertEqual(tag.name, "with#hash")
        self.assertEqual(tag.slug, "withhash")
Example #3
0
 def test_clean_case(self):
     tag = EventTag(name=u"BIGlettersHERE")
     tag.clean()
     self.assertEqual(tag.name, "biglettershere")
     self.assertEqual(tag.slug, "biglettershere")
Example #4
0
 def test_clean_case(self):
     tag = EventTag(name=u"BIGlettersHERE")
     tag.clean()
     self.assertEqual(tag.name, "biglettershere")
     self.assertEqual(tag.slug, "biglettershere")