mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Refs #32290 -- Added {% extends %} test for relative path in variable.
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							f4272d000a
						
					
				
				
					commit
					640a6e1dce
				
			
							
								
								
									
										3
									
								
								tests/template_tests/relative_templates/one_var.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/template_tests/relative_templates/one_var.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| {% extends tmpl %} | ||||
|  | ||||
| {% block content %}{{ block.super }} one{% endblock %} | ||||
| @@ -16,6 +16,12 @@ class ExtendsRelativeBehaviorTests(SimpleTestCase): | ||||
|         output = template.render(Context({})) | ||||
|         self.assertEqual(output.strip(), 'three two one') | ||||
|  | ||||
|     def test_normal_extend_variable(self): | ||||
|         engine = Engine(dirs=[RELATIVE]) | ||||
|         template = engine.get_template('one_var.html') | ||||
|         output = template.render(Context({'tmpl': './two.html'})) | ||||
|         self.assertEqual(output.strip(), 'three two one') | ||||
|  | ||||
|     def test_dir1_extend(self): | ||||
|         engine = Engine(dirs=[RELATIVE]) | ||||
|         template = engine.get_template('dir1/one.html') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user