예제 #1
0
def test_element_lxml_name_with_namespace(string_type):
    surname_elem = Element('Surname', element_type=string_type)
    surname_elem.namespace = 'foo.bar.com'

    namespaces = {'foo.bar.com': 'f'}

    assert surname_elem.lxml_name(namespaces) == 'f:Surname'
예제 #2
0
def test_element_lxml_name(string_type):
    surname_elem = Element('Surname', element_type=string_type)

    assert surname_elem.lxml_name() == 'Surname'