#!/usr/bin/env python

import unittest
import re

from genshi.template import MarkupTemplate

tmpl_data="""<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/">
  <py:match path="body/div[@id='properties']" />
  
  <head py:match="head" />
  <head py:match="head" />
  <head/>
  
  <body>
    <div id="properties">Foo</div>
  </body>
</html>
"""

class TestNoMatchWithMultipleMatchTemplates(unittest.TestCase):
    def test_no_match(self):
        tmpl = MarkupTemplate(tmpl_data)
        html = tmpl.generate().render('xhtml', doctype='xhtml')
        assert 'Foo' not in html, html



