示例#1
0
def test_assign_qword():
    init_type = mock.MagicMock(return_value="STRING")
    init_arg = mock.MagicMock()
    BYTE_ARRAY_test = BYTE_ARRAY(init_type.return_value, str(init_arg))
    assign_qword_offset = mock.MagicMock()
    assign_qword_qword = mock.MagicMock()
    BYTE_ARRAY_test.assign_qword(int(assign_qword_offset), assign_qword_qword)
示例#2
0
def test_get_string():
    init_type = mock.MagicMock(return_value="STRING")
    init_arg = mock.MagicMock()
    BYTE_ARRAY_test = BYTE_ARRAY(init_type.return_value, str(init_arg))
    get_string_offset = mock.MagicMock()
    get_string_size = mock.MagicMock()
    BYTE_ARRAY_test.get_string(int(get_string_offset), int(get_string_size))
示例#3
0
def test_resize():
    init_type = mock.MagicMock(return_value="STRING")
    init_arg = mock.MagicMock()
    BYTE_ARRAY_test = BYTE_ARRAY(init_type.return_value, str(init_arg))
    resize_size = mock.MagicMock()
    BYTE_ARRAY_test.resize(int(resize_size))
示例#4
0
def test_get_qword():
    init_type = mock.MagicMock(return_value="STRING")
    init_arg = mock.MagicMock()
    BYTE_ARRAY_test = BYTE_ARRAY(init_type.return_value, str(init_arg))
    get_qword_offset = mock.MagicMock()
    BYTE_ARRAY_test.get_qword(int(get_qword_offset))
示例#5
0
def test_clear_data():
    init_type = mock.MagicMock(return_value="STRING")
    init_arg = mock.MagicMock()
    BYTE_ARRAY_test = BYTE_ARRAY(init_type.return_value, str(init_arg))
    BYTE_ARRAY_test.clear_data()
示例#6
0
def test_append_data_swizzled():
    init_type = mock.MagicMock(return_value="STRING")
    init_arg = mock.MagicMock()
    BYTE_ARRAY_test = BYTE_ARRAY(init_type.return_value, str(init_arg))
    append_data_swizzled_chars = mock.MagicMock()
    BYTE_ARRAY_test.append_data_swizzled(append_data_swizzled_chars)
示例#7
0
def test_append_qword():
    init_type = mock.MagicMock(return_value="STRING")
    init_arg = mock.MagicMock()
    BYTE_ARRAY_test = BYTE_ARRAY(init_type.return_value, str(init_arg))
    append_qword_data = mock.MagicMock()
    BYTE_ARRAY_test.append_qword(append_qword_data)
示例#8
0
def test_tofile():
    init_type = mock.MagicMock(return_value="FILE")
    init_arg = mock.MagicMock(spec=file, wraps=StringIO('test'))
    BYTE_ARRAY_test = BYTE_ARRAY(init_type.return_value, init_arg)
    tofile_file = mock.MagicMock()
    BYTE_ARRAY_test.tofile(tofile_file)