예제 #1
0
 def test_get_safe_name_fallback(self):
     iframe = Iframe(
         position=2, region="test", content_type=self.content_type, content_id=1, url="https://news.bbc.co.uk/"
     )
     iframe.full_clean()
     iframe.save()
     self.assertEqual(iframe.get_safe_name(), "chunk-iframe-1")
예제 #2
0
 def test_get_safe_name(self):
     iframe = Iframe(
         position=2,
         region="test",
         content_type=self.content_type,
         content_id=1,
         url="https://news.bbc.co.uk/",
         name="BBC News",
     )
     iframe.full_clean()
     iframe.save()
     self.assertEqual(iframe.get_safe_name(), "bbc-news")