Edit File: test_templating.cpython-36.opt-1.pyc
3 �k�`�� � @ s� d dl Z d dlZd dlZdZdZdZdZdZdZdZ d Z G d d� de j�ZG dd � d e j�Z G dd� de j�ZG dd� de j�ZG dd� de j�Zdd� Zdd� Zdd� Zdd� Zedkr�e� dS )� Na <?xml version="1.0"?> <root xmlns:meld="https://github.com/Supervisor/supervisor"> <list meld:id="list"> <item meld:id="item"> <name meld:id="name">Name</name> <description meld:id="description">Description</description> </item> </list> </root>z�<html xmlns="http://www.w3.org/1999/xhtml" xmlns:meld="https://github.com/Supervisor/supervisor"> <body meld:id="body">Hello!</body> </html>z�<html> <body> <area/><base/><basefont/><br/><col/><frame/><hr/><img/><input/><isindex/> <link/><meta/><param/> </body> </html>a? <html> <body> <tag selected="true"/> <tag checked="true"/> <tag compact="true"/> <tag declare="true"/> <tag defer="true"/> <tag disabled="true"/> <tag ismap="true"/> <tag multiple="true"/> <tag nohref="true"/> <tag noresize="true"/> <tag noshade="true"/> <tag nowrap="true"/> </body> </html>z^ <html> <head></head> <body> <!-- test entity references --> <p> </p> </body> </html>a: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:meld="https://github.com/Supervisor/supervisor" xmlns:bar="http://foo/bar"> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" /> <title meld:id="title">This will be escaped in html output: &</title> <script>this won't be escaped in html output: &</script> <script type="text/javascript"> //<![CDATA[ // this won't be escaped in html output function match(a,b) { if (a < b && a > 0) then { return 1 } } //]]> </script> <style>this won't be escaped in html output: &</style> </head> <!-- a comment --> <body> <div bar:baz="slab"/> <div meld:id="content_well"> <form meld:id="form1" action="." method="POST"> <img src="foo.gif"/> <table border="0" meld:id="table1"> <tbody meld:id="tbody"> <tr meld:id="tr" class="foo"> <td meld:id="td1">Name</td> <td meld:id="td2">Description</td> </tr> </tbody> </table> <input type="submit" name="submit" value=" Next "/> </form> </div> </body> </html>a <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title meld:id="title">test doc</title> </head> <body> <!-- comment! --> Oh yeah...<br> <br> <table style="text-align: left; width: 100px;" border="1" cellpadding="2" cellspacing="2"> <tbody> <tr> <td>Yup</td> <td>More </td> <td>Stuff</td> <td>Oh Yeah</td> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> </tr> </tbody> </table> <br> <a href=".">And an image...</a><br> <br> <img style="width: 2048px; height: 1536px;" alt="dumb" src="IMG_0102.jpg"> </body> </html>aO <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Emergency Contacts</title> </head> <body> <div class="header">Emergency Contacts</div> <form action="." method="POST"> <table> <tbody meld:id="tbody"> <tr> <th>Title</th> <td> <input type="text" name="honorific" size="6" value="" meld:id="honorific"/> </td> </tr> <tr> <th>First Name</th> <td> <input type="text" name="firstname" size="20" value="" meld:id="firstname"/> </td> </tr> <tr> <th>Middle Name</th> <td> <input type="text" name="middlename" size="15" value="" meld:id="middlename"/> </td> </tr> <tr> <th>Last Name</th> <td> <input type="text" name="lastname" size="20" value="" meld:id="lastname"/> </td> </tr> <tr> <th>Suffix</th> <td style="width: 554px;"> <select name="suffix" meld:id="suffix"> <option value="Jr.">Jr.</option> <option value="Sr.">Sr.</option> <option value="III">III</option> </select> </td> </tr> <tr> <th>Address 1</th> <td> <input type="text" name="address1" size="30" value="" meld:id="address1"/> </td> </tr> <tr> <th>Address 2</th> <td> <input type="text" name="address2" size="30" value="" meld:id="address2"/> </td> </tr> <tr> <th>City</th> <td> <input type="text" name="city" size="20" value="" meld:id="city"/> </td> </tr> <tr> <th>State</th> <td> <input type="text" name="state" size="5" value="" meld:id="state"/> </td> </tr> <tr> <th>ZIP</th> <td> <input type="text" name="zip" size="8" value="" meld:id="zip"/> </td> </tr> <tr> <th>Home Phone</th> <td> <input type="text" name="homephone" size="12" value="" meld:id="homephone"/> </td> </tr> <tr> <th>Cell/Mobile Phone</th> <td> <input type="text" name="cellphone" size="12" value="" meld:id="cellphone"/> </td> </tr> <tr> <th>Email Address</th> <td> <input type="text" name="email" size="20" value="" meld:id="email"/> </td> </tr> <tr> <th>Over 18? (Checkbox Boolean)</th> <td> <input type="checkbox" name="over18" meld:id="over18" value="true" checked="true"/> </td> </tr> <tr> <th>Mail OK? (Checkbox Ternary)</th> <td style="width: 554px;" meld:id="mailok:inputgroup"> <input type="hidden" name="mailok:default" value="false"/> <input type="checkbox" name="mailok" value="true" checked/> <input type="checkbox" name="mailok" value="false"/> </td> </tr> <tr> <th>Favorite Color (Radio)</th> <td style="width: 554px;" meld:id="favorite_color:inputgroup"> Red <input type="radio" name="favorite_color" value="Red"/> Green <input type="radio" name="favorite_color" value="Green"/> Blue <input type="radio" name="favorite_color" value="Blue"/> </td> </tr> <tr> <th></th> <td> <input type="submit" value=" Update " name="edit:method" /> </td> </tr> </tbody> </table> </form> <p><a href="..">Return to list</a></p> </body> </html> c @ s� e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� ZdS ) �MeldAPITestsc C s ddl m} ||�S )Nr )�parse_xmlstring)�supervisor.templatingr )�self�stringr � r �%/usr/lib/python3.6/test_templating.py�_makeElement8 s zMeldAPITests._makeElementc C s ddl m} ||�S )Nr )�parse_htmlstring)r r )r r r r r r �_makeElementFromHTML< s z!MeldAPITests._makeElementFromHTMLc C s>