Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Pylons/webtest
/ to_bytes
Function
to_bytes
webtest/compat.py:8–11 ·
view source on GitHub ↗
(value, charset='latin1')
Source
from the content-addressed store, hash-verified
6
7
8
def
to_bytes(value, charset=
'latin1'
):
9
if
isinstance(value, str):
10
return
value.encode(charset)
11
return
value
12
13
14
from
html.entities
import
name2codepoint
Callers
15
TestResponse
Class · 0.90
set_authorization
Method · 0.90
encode_multipart
Method · 0.90
_append_file
Method · 0.90
_gen_request
Method · 0.90
test_basic_authorization
Method · 0.90
callFUT
Method · 0.90
select_app
Function · 0.90
select_app_without_values
Function · 0.90
select_app_without_default
Function · 0.90
get_files_page
Method · 0.90
get_files_page
Method · 0.90
Calls
no outgoing calls
Tested by
15
test_basic_authorization
Method · 0.72
callFUT
Method · 0.72
select_app
Function · 0.72
select_app_without_values
Function · 0.72
select_app_without_default
Function · 0.72
get_files_page
Method · 0.72
get_files_page
Method · 0.72
test_file_upload_with_filename_only
Method · 0.72
test_file_upload_with_filename_and_contents
Method · 0.72
test_several_file_uploads_with_filename_and_contents
Method · 0.72
test_multiple_file
Method · 0.72
test_iter
Method · 0.72
Used in the wild
real call sites across dependent graphs
searching dependent graphs…