Exemple #1
0
 def test_map(self):
     from smartmin.templatetags.smartmin import map
     self.assertEquals("title: First Post id: 1",
                       map("title: %(title)s id: %(id)d", self.post))
Exemple #2
0
 def test_map(self):
     from smartmin.templatetags.smartmin import map
     self.assertEquals("title: First Post id: 1", map("title: %(title)s id: %(id)d", self.post))
Exemple #3
0
 def test_map(self):
     from smartmin.templatetags.smartmin import map
     kwargs = {'title': self.post.title, 'id': self.post.pk}
     self.assertEquals("title: {title} id: {id}".format(**kwargs),
                       map("title: %(title)s id: %(id)d", self.post))