예제 #1
0
 def test_absolute_url_subtopic(self):
     p = ProductFactory()
     t1 = TopicFactory(product=p)
     t2 = TopicFactory(parent=t1, product=p)
     expected = '/products/{p}/{t1}/{t2}'.format(p=p.slug, t1=t1.slug, t2=t2.slug)
     actual = t2.get_absolute_url()
     eq_(actual, expected)
예제 #2
0
파일: test_models.py 프로젝트: zu83/kitsune
 def test_absolute_url_subtopic(self):
     p = ProductFactory()
     t1 = TopicFactory(product=p)
     t2 = TopicFactory(parent=t1, product=p)
     expected = "/products/{p}/{t1}/{t2}".format(p=p.slug,
                                                 t1=t1.slug,
                                                 t2=t2.slug)
     actual = t2.get_absolute_url()
     eq_(actual, expected)
예제 #3
0
파일: test_models.py 프로젝트: zu83/kitsune
 def test_absolute_url(self):
     p = ProductFactory()
     t = TopicFactory(product=p)
     expected = "/products/{p}/{t}".format(p=p.slug, t=t.slug)
     actual = t.get_absolute_url()
     eq_(actual, expected)
예제 #4
0
 def test_absolute_url(self):
     p = ProductFactory()
     t = TopicFactory(product=p)
     expected = '/products/{p}/{t}'.format(p=p.slug, t=t.slug)
     actual = t.get_absolute_url()
     eq_(actual, expected)