Exemple #1
0
 def test_templatetag(self):
     s = Setting()
     s.site_name = "Example name"
     s.save()
     template = Template(
         '{% load setting_tags %}{% site_setting "site_name" %}')
     self.assertEquals(template.render(Context({})), "Example name")
Exemple #2
0
 def test_templatetag(self):
 	s = Setting()
 	s.site_name = "Example name"
 	s.save()
 	template = Template('{% load setting_tags %}{% site_setting "site_name" %}')
 	self.assertEquals(template.render(Context({})), "Example name")
Exemple #3
0
 def test_setting_addition(self):
 	s = Setting()
 	s.site_name = "Example name"
 	s.save()
 	self.assertEquals(get_setting('site_name',''), "Example name")
Exemple #4
0
 def test_setting_addition(self):
     s = Setting()
     s.site_name = "Example name"
     s.save()
     self.assertEquals(get_setting('site_name', ''), "Example name")