Commits

Shu Zong Chen committed 6ca7fbb

Fixed test to use SITE environ variable

Comments (0)

Files changed (1)

facebook_comments/tests.py

 class FBCommentBasicTest(unittest.TestCase):
 	def setUp(self):
 		self.path = os.environ.get('SITE')
-		self.c = Context()
+		self.c = Context({"path":self.path})
 	
 	def test_nothing(self):
 		t_str = """{% load fb_comments %}"""
 		output = t.render(self.c)
 	
 	def test_render(self):
-		t_str = """{% load fb_comments %}{% fb_comments href="http://www.google.com/" %}"""
+		t_str = """{% load fb_comments %}{% fb_comments href=path %}"""
 		t = Template(t_str)
 		output = t.render(self.c)
 
 		self.assertTrue("<script>" in output)
 	
 	def test_no_scripts(self):
-		t_str = """{% load fb_comments %}{% fb_comments href="http://www.google.com/" no_scripts %}"""
+		t_str = """{% load fb_comments %}{% fb_comments href=path no_scripts %}"""
 		t = Template(t_str)
 		output = t.render(self.c)