Exemple #1
0
 def test_save(self):
     '''Just testing that autoslugify works.'''
     tag = Tag(text='Test Me 2/ See IF it (works)')
     tag.save()
     expected = 'test-me-2-see-if-it-works'
     actual = tag.slug
     self.failUnlessEqual(expected, actual, 'Expected %s but slug was %s'% (expected, actual))
Exemple #2
0
 def import_tags(self):
     '''Import Tags.'''
     tags = self.chan.findall(self.wp_ns + 'tag')
     for tag in tags:
         t = Tag()
         t.text=tag.find(self.wp_ns + 'tag_name').text
         t.slug=tag.find(self.wp_ns + 'tag_slug').text
         t.save()