From 1528dd064119d2de63dd8afa6488e9b05f816230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Wed, 1 Jul 2015 10:26:47 +0200 Subject: [PATCH] use six.b instead of suds.byte_str in the test_suds.py test module --- tests/test_suds.py | 63 +++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/tests/test_suds.py b/tests/test_suds.py index 3c6785e..c0c7edc 100644 --- a/tests/test_suds.py +++ b/tests/test_suds.py @@ -33,7 +33,7 @@ import suds from testutils.compare_sax import CompareSAX import pytest -from six import itervalues, next +from six import b, itervalues, next import re import xml.sax @@ -89,13 +89,13 @@ def test_choice_parameter_implementation_inconsistencies(): def test_converting_client_to_string_must_not_raise_an_exception(): - client = testutils.client_from_wsdl(suds.byte_str( - "")) + client = testutils.client_from_wsdl( + b("")) str(client) def test_converting_metadata_to_string(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_empty_invalid_WSDL(monkeypatch): - wsdl = suds.byte_str("") monkeypatch.delitem(locals(), "e", False) e = pytest.raises(xml.sax.SAXParseException, testutils.client_from_wsdl, - wsdl) + b("")) try: assert e.value.getMessage() == "no element found" finally: @@ -153,14 +152,14 @@ def test_empty_invalid_WSDL(monkeypatch): def test_empty_valid_WSDL(): - client = testutils.client_from_wsdl(suds.byte_str( - "")) + client = testutils.client_from_wsdl( + b("")) assert not client.wsdl.services, "No service definitions must be read " \ "from an empty WSDL." def test_enumeration_type_string_should_contain_its_value(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_function_parameters_global_sequence_in_a_sequence(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_function_parameters_local_choice(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_function_parameters_local_choice_in_a_sequence(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_function_parameters_local_sequence_in_a_sequence(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_function_parameters_sequence_in_a_choice(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_function_parameters_sequence_in_a_choice_in_a_sequence(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_function_parameters_strings(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_global_enumeration(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_global_sequence_in_a_global_sequence(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_global_string_sequence(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_local_sequence_in_a_global_sequence(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_no_trailing_comma_in_function_prototype_description_string__0(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_no_trailing_comma_in_function_prototype_description_string__1(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_no_trailing_comma_in_function_prototype_description_string__3(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_no_types(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_schema_node_resolve(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_schema_node_resolve__nobuiltin_caching(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_schema_node_resolve__invalid_type(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_schema_node_resolve__references(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_schema_object_child_access_by_index(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_simple_wsdl(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\ def test_wsdl_schema_content(): - client = testutils.client_from_wsdl(suds.byte_str("""\ + client = testutils.client_from_wsdl(b("""\