unittests added to some plugins

added "name" tag to all form elements
This commit is contained in:
lars 2006-10-26 12:25:12 +00:00
parent 0a8fc07556
commit 1dc0da0382
23 changed files with 199 additions and 28 deletions

View file

@ -10,14 +10,14 @@
<table style="text-align:center; width:100%">
<tr>
<td style="text-align: right">
<?cs call:print_form_header("plugins/shutdown") ?>
<?cs call:print_form_header("reboot", "plugins/shutdown") ?>
<input type="hidden" name="type" value="reboot" />
<button type="submit" tabindex="2"><?cs var:html_escape(Lang.Plugins.shutdown.Button.Reboot) ?></button>
</form>
</td>
<td style="width:5%"></td>
<td style="text-align: left">
<?cs call:print_form_header("plugins/shutdown") ?>
<?cs call:print_form_header("shutdown", "plugins/shutdown") ?>
<input type="hidden" name="type" value="shutdown" />
<button type="submit" tabindex="1"><?cs var:html_escape(Lang.Plugins.shutdown.Button.Shutdown) ?></button>
</form>

View file

@ -0,0 +1,11 @@
import WebInterfaceTestClass
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
def test_read_form(self):
url = self.URL + "plugins/shutdown"
self.register_auth(url)
self.cmd.go(url)
self.cmd.find('<form name="shutdown"')
self.cmd.find('<form name="reboot"')