MCPcopy Create free account
hub / github.com/Pylons/webtest / test_post_int

Method test_post_int

tests/test_forms.py:1024–1032  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1022 self.assertFile(uploaded_file1_name, uploaded_file1_contents, display)
1023
1024 def test_post_int(self):
1025 binary_data = struct.pack('255h', *range(0, 255))
1026 app = webtest.TestApp(SingleUploadFileApp())
1027 res = app.get('/')
1028 single_form = res.forms["file_upload_form"]
1029 single_form.set("file-field", ('my_file.dat', binary_data))
1030 single_form.set("int-field", 100)
1031 # just check it does not raise
1032 single_form.submit("button")
1033
1034 def test_invalid_types(self):
1035 binary_data = struct.pack('255h', *range(0, 255))

Callers

nothing calls this directly

Calls 4

getMethod · 0.95
SingleUploadFileAppClass · 0.85
setMethod · 0.80
submitMethod · 0.80

Tested by

no test coverage detected