def test_tag_should_be_expanded_from_database(self): tag_expander = VclTagExpander('ACL', 'ACL', VclRendererInput(), can_overwrite=True) assert_equals('## ACL custom content ##', tag_expander.expand(self.vcl_template3))
def test_tag_should_be_expanded_from_file_template(self): tag_expander = VclTagExpander('VCL', 'VCL', VclRendererInput()) expected_v4 = '''\ # Marker to tell the VCL compiler that this VCL has been adapted to the # new 4.0 format. vcl 4.0; import std; import directors; <HEADERS/> <ACL/> <DIRECTORS/> <VAAS_STATUS/> <RECV/> <OTHER_FUNCTIONS/> <EMPTY_DIRECTOR_SYNTH/>''' assert_equals(expected_v4, tag_expander.expand(self.vcl_template4))