qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [03/11] qpid-proton git commit: PROTON-1885: [python] move tests/python to python/tests
Date Fri, 06 Jul 2018 16:59:15 GMT
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9778eda8/tests/python/proton_tests/transport.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/transport.py b/tests/python/proton_tests/transport.py
deleted file mode 100644
index 5390d07..0000000
--- a/tests/python/proton_tests/transport.py
+++ /dev/null
@@ -1,393 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-import os
-import sys
-from . import common
-from proton import *
-
-
-class Test(common.Test):
-  pass
-
-class ClientTransportTest(Test):
-
-  def setUp(self):
-    self.transport = Transport()
-    self.peer = Transport()
-    self.conn = Connection()
-    self.peer.bind(self.conn)
-
-  def tearDown(self):
-    self.transport = None
-    self.peer = None
-    self.conn = None
-
-  def drain(self):
-    while True:
-      p = self.transport.pending()
-      if p < 0:
-        return
-      elif p > 0:
-        data = self.transport.peek(p)
-        self.peer.push(data)
-        self.transport.pop(len(data))
-      else:
-        assert False
-
-  def assert_error(self, name):
-    assert self.conn.remote_container is None, self.conn.remote_container
-    self.drain()
-    # verify that we received an open frame
-    assert self.conn.remote_container is not None, self.conn.remote_container
-    # verify that we received a close frame
-    assert self.conn.state == Endpoint.LOCAL_UNINIT | Endpoint.REMOTE_CLOSED, self.conn.state
-    # verify that a framing error was reported
-    assert self.conn.remote_condition.name == name, self.conn.remote_condition
-
-  def testEOS(self):
-    self.transport.push(b"") # should be a noop
-    self.transport.close_tail() # should result in framing error
-    self.assert_error(u'amqp:connection:framing-error')
-
-  def testPartial(self):
-    self.transport.push(b"AMQ") # partial header
-    self.transport.close_tail() # should result in framing error
-    self.assert_error(u'amqp:connection:framing-error')
-
-  def testGarbage(self, garbage=b"GARBAGE_"):
-    self.transport.push(garbage)
-    self.assert_error(u'amqp:connection:framing-error')
-    assert self.transport.pending() < 0
-    self.transport.close_tail()
-    assert self.transport.pending() < 0
-
-  def testSmallGarbage(self):
-    self.testGarbage(b"XXX")
-
-  def testBigGarbage(self):
-    self.testGarbage(b"GARBAGE_XXX")
-
-  def testHeader(self):
-    self.transport.push(b"AMQP\x00\x01\x00\x00")
-    self.transport.close_tail()
-    self.assert_error(u'amqp:connection:framing-error')
-
-  def testHeaderBadDOFF1(self):
-    """Verify doff > size error"""
-    self.testGarbage(b"AMQP\x00\x01\x00\x00\x00\x00\x00\x08\x08\x00\x00\x00")
-
-  def testHeaderBadDOFF2(self):
-    """Verify doff < 2 error"""
-    self.testGarbage(b"AMQP\x00\x01\x00\x00\x00\x00\x00\x08\x01\x00\x00\x00")
-
-  def testHeaderBadSize(self):
-    """Verify size > max_frame_size error"""
-    self.transport.max_frame_size = 512
-    self.testGarbage(b"AMQP\x00\x01\x00\x00\x00\x00\x02\x01\x02\x00\x00\x00")
-
-  def testProtocolNotSupported(self):
-    self.transport.push(b"AMQP\x01\x01\x0a\x00")
-    p = self.transport.pending()
-    assert p >= 8, p
-    bytes = self.transport.peek(p)
-    assert bytes[:8] == b"AMQP\x00\x01\x00\x00"
-    self.transport.pop(p)
-    self.drain()
-    assert self.transport.closed
-
-  def testPeek(self):
-    out = self.transport.peek(1024)
-    assert out is not None
-
-  def testBindAfterOpen(self):
-    conn = Connection()
-    ssn = conn.session()
-    conn.open()
-    ssn.open()
-    conn.container = "test-container"
-    conn.hostname = "test-hostname"
-    trn = Transport()
-    trn.bind(conn)
-    out = trn.peek(1024)
-    assert b"test-container" in out, repr(out)
-    assert b"test-hostname" in out, repr(out)
-    self.transport.push(out)
-
-    c = Connection()
-    assert c.remote_container == None
-    assert c.remote_hostname == None
-    assert c.session_head(0) == None
-    self.transport.bind(c)
-    assert c.remote_container == "test-container"
-    assert c.remote_hostname == "test-hostname"
-    assert c.session_head(0) != None
-
-  def testCloseHead(self):
-    n = self.transport.pending()
-    assert n > 0, n
-    try:
-      self.transport.close_head()
-    except TransportException:
-      e = sys.exc_info()[1]
-      assert "aborted" in str(e), str(e)
-    n = self.transport.pending()
-    assert n < 0, n
-
-  def testCloseTail(self):
-    n = self.transport.capacity()
-    assert n > 0, n
-    try:
-      self.transport.close_tail()
-    except TransportException:
-      e = sys.exc_info()[1]
-      assert "aborted" in str(e), str(e)
-    n = self.transport.capacity()
-    assert n < 0, n
-
-  def testUnpairedPop(self):
-    conn = Connection()
-    self.transport.bind(conn)
-
-    conn.hostname = "hostname"
-    conn.open()
-
-    dat1 = self.transport.peek(1024)
-
-    ssn = conn.session()
-    ssn.open()
-
-    dat2 = self.transport.peek(1024)
-
-    assert dat2[:len(dat1)] == dat1
-
-    snd = ssn.sender("sender")
-    snd.open()
-
-    self.transport.pop(len(dat1))
-    self.transport.pop(len(dat2) - len(dat1))
-    dat3 = self.transport.peek(1024)
-    self.transport.pop(len(dat3))
-    assert self.transport.peek(1024) == b""
-
-    self.peer.push(dat1)
-    self.peer.push(dat2[len(dat1):])
-    self.peer.push(dat3)
-
-class ServerTransportTest(Test):
-
-  def setUp(self):
-    self.transport = Transport(Transport.SERVER)
-    self.peer = Transport()
-    self.conn = Connection()
-    self.peer.bind(self.conn)
-
-  def tearDOwn(self):
-    self.transport = None
-    self.peer = None
-    self.conn = None
-
-  def drain(self):
-    while True:
-      p = self.transport.pending()
-      if p < 0:
-        return
-      elif p > 0:
-        bytes = self.transport.peek(p)
-        self.peer.push(bytes)
-        self.transport.pop(len(bytes))
-      else:
-        assert False
-
-  def assert_error(self, name):
-    assert self.conn.remote_container is None, self.conn.remote_container
-    self.drain()
-    # verify that we received an open frame
-    assert self.conn.remote_container is not None, self.conn.remote_container
-    # verify that we received a close frame
-    assert self.conn.state == Endpoint.LOCAL_UNINIT | Endpoint.REMOTE_CLOSED, self.conn.state
-    # verify that a framing error was reported
-    assert self.conn.remote_condition.name == name, self.conn.remote_condition
-
-  # TODO: This may no longer be testing anything
-  def testEOS(self):
-    self.transport.push(b"") # should be a noop
-    self.transport.close_tail()
-    p = self.transport.pending()
-    self.drain()
-    assert self.transport.closed
-
-  def testPartial(self):
-    self.transport.push(b"AMQ") # partial header
-    self.transport.close_tail()
-    p = self.transport.pending()
-    assert p >= 8, p
-    bytes = self.transport.peek(p)
-    assert bytes[:8] == b"AMQP\x00\x01\x00\x00"
-    self.transport.pop(p)
-    self.drain()
-    assert self.transport.closed
-
-  def testGarbage(self, garbage=b"GARBAGE_"):
-    self.transport.push(garbage)
-    p = self.transport.pending()
-    assert p >= 8, p
-    bytes = self.transport.peek(p)
-    assert bytes[:8] == b"AMQP\x00\x01\x00\x00"
-    self.transport.pop(p)
-    self.drain()
-    assert self.transport.closed
-
-  def testSmallGarbage(self):
-    self.testGarbage(b"XXX")
-
-  def testBigGarbage(self):
-    self.testGarbage(b"GARBAGE_XXX")
-
-  def testHeader(self):
-    self.transport.push(b"AMQP\x00\x01\x00\x00")
-    self.transport.close_tail()
-    self.assert_error(u'amqp:connection:framing-error')
-
-  def testProtocolNotSupported(self):
-    self.transport.push(b"AMQP\x01\x01\x0a\x00")
-    p = self.transport.pending()
-    assert p >= 8, p
-    bytes = self.transport.peek(p)
-    assert bytes[:8] == b"AMQP\x00\x01\x00\x00"
-    self.transport.pop(p)
-    self.drain()
-    assert self.transport.closed
-
-  def testPeek(self):
-    out = self.transport.peek(1024)
-    assert out is not None
-
-  def testBindAfterOpen(self):
-    conn = Connection()
-    ssn = conn.session()
-    conn.open()
-    ssn.open()
-    conn.container = "test-container"
-    conn.hostname = "test-hostname"
-    trn = Transport()
-    trn.bind(conn)
-    out = trn.peek(1024)
-    assert b"test-container" in out, repr(out)
-    assert b"test-hostname" in out, repr(out)
-    self.transport.push(out)
-
-    c = Connection()
-    assert c.remote_container == None
-    assert c.remote_hostname == None
-    assert c.session_head(0) == None
-    self.transport.bind(c)
-    assert c.remote_container == "test-container"
-    assert c.remote_hostname == "test-hostname"
-    assert c.session_head(0) != None
-
-  def testCloseHead(self):
-    n = self.transport.pending()
-    assert n >= 0, n
-    try:
-      self.transport.close_head()
-    except TransportException:
-      e = sys.exc_info()[1]
-      assert "aborted" in str(e), str(e)
-    n = self.transport.pending()
-    assert n < 0, n
-
-  def testCloseTail(self):
-    n = self.transport.capacity()
-    assert n > 0, n
-    try:
-      self.transport.close_tail()
-    except TransportException:
-      e = sys.exc_info()[1]
-      assert "aborted" in str(e), str(e)
-    n = self.transport.capacity()
-    assert n < 0, n
-
-  def testUnpairedPop(self):
-    conn = Connection()
-    self.transport.bind(conn)
-
-    conn.hostname = "hostname"
-    conn.open()
-
-    dat1 = self.transport.peek(1024)
-
-    ssn = conn.session()
-    ssn.open()
-
-    dat2 = self.transport.peek(1024)
-
-    assert dat2[:len(dat1)] == dat1
-
-    snd = ssn.sender("sender")
-    snd.open()
-
-    self.transport.pop(len(dat1))
-    self.transport.pop(len(dat2) - len(dat1))
-    dat3 = self.transport.peek(1024)
-    self.transport.pop(len(dat3))
-    assert self.transport.peek(1024) == b""
-
-    self.peer.push(dat1)
-    self.peer.push(dat2[len(dat1):])
-    self.peer.push(dat3)
-
-  def testEOSAfterSASL(self):
-    self.transport.sasl().allowed_mechs('ANONYMOUS')
-
-    self.peer.sasl().allowed_mechs('ANONYMOUS')
-
-    # this should send over the sasl header plus a sasl-init set up
-    # for anonymous
-    p = self.peer.pending()
-    self.transport.push(self.peer.peek(p))
-    self.peer.pop(p)
-
-    # now we send EOS
-    self.transport.close_tail()
-
-    # the server may send an error back
-    p = self.transport.pending()
-    while p>0:
-      self.peer.push(self.transport.peek(p))
-      self.transport.pop(p)
-      p = self.transport.pending()
-
-    # server closed
-    assert self.transport.pending() < 0
-
-class LogTest(Test):
-
-  def testTracer(self):
-    t = Transport()
-    assert t.tracer is None
-    messages = []
-    def tracer(transport, message):
-      messages.append((transport, message))
-    t.tracer = tracer
-    assert t.tracer is tracer
-    t.log("one")
-    t.log("two")
-    t.log("three")
-    assert messages == [(t, "one"), (t, "two"), (t, "three")], messages

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9778eda8/tests/python/proton_tests/url.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/url.py b/tests/python/proton_tests/url.py
deleted file mode 100644
index b44699a..0000000
--- a/tests/python/proton_tests/url.py
+++ /dev/null
@@ -1,147 +0,0 @@
-from __future__ import absolute_import
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-
-from . import common
-from proton import Url
-
-class UrlTest(common.Test):
-    def assertEqual(self, a, b):
-        assert a == b, "%s != %s" % (a, b)
-
-    def assertNotEqual(self, a, b):
-        assert a != b, "%s == %s" % (a, b)
-
-    def assertUrl(self, u, scheme, username, password, host, port, path):
-        self.assertEqual((u.scheme, u.username, u.password, u.host, u.port, u.path),
-                         (scheme, username, password, host, port, path))
-
-    def testUrl(self):
-        url = Url('amqp://me:secret@myhost:1234/foobar')
-        self.assertEqual(str(url), "amqp://me:secret@myhost:1234/foobar")
-        self.assertUrl(url, 'amqp', 'me', 'secret', 'myhost', 1234, 'foobar')
-        self.assertEqual(str(url), "amqp://me:secret@myhost:1234/foobar")
-
-    def testDefaults(self):
-        # Check that we allow None for scheme, port
-        url = Url(username='me', password='secret', host='myhost', path='foobar', defaults=False)
-        self.assertEqual(str(url), "//me:secret@myhost/foobar")
-        self.assertUrl(url, None, 'me', 'secret', 'myhost', None, 'foobar')
-
-        self.assertEqual(str(Url("amqp://me:secret@myhost/foobar")),
-                         "amqp://me:secret@myhost:amqp/foobar")
-
-        # Empty string vs. None for path
-        self.assertEqual(Url("myhost/").path, "")
-        assert Url("myhost", defaults=False).path is None
-
-        # Expanding abbreviated url strings.
-        for s, u in [
-            ("", "amqp://0.0.0.0:amqp"),
-            ("foo", "amqp://foo:amqp"),
-            (":1234", "amqp://0.0.0.0:1234"),
-            ("/path", "amqp://0.0.0.0:amqp/path"),
-            ("user@host/topic://test", "amqp://user@host:amqp/topic://test"),
-            ("user@host:3456", "amqp://user@host:3456"),
-            ("user:pass@host/topic://test", "amqp://user:pass@host:amqp/topic://test")
-        ]: self.assertEqual(str(Url(s)), u)
-
-    def assertPort(self, port, portint, portstr):
-        self.assertEqual((port, port), (portint, portstr))
-        self.assertEqual((int(port), str(port)), (portint, portstr))
-
-    def testPort(self):
-        self.assertPort(Url.Port('amqp'), 5672, 'amqp')
-        self.assertPort(Url.Port(5672), 5672, '5672')
-        self.assertPort(Url.Port(5671), 5671, '5671')
-        self.assertEqual(Url.Port(5671)+1, 5672) # Treat as int
-        self.assertEqual(str(Url.Port(5672)), '5672')
-
-        self.assertPort(Url.Port(Url.Port('amqp')), 5672, 'amqp')
-        self.assertPort(Url.Port(Url.Port(5672)), 5672, '5672')
-
-        try:
-            Url.Port('xxx')
-            assert False, "Expected ValueError"
-        except ValueError: pass
-
-        self.assertEqual(str(Url("host:amqp", defaults=False)), "//host:amqp")
-        self.assertEqual(Url("host:amqp", defaults=False).port, 5672)
-
-    def testArgs(self):
-        u = Url("amqp://u:p@host:amqp/path", scheme='foo', host='bar', port=1234, path='garden',
defaults=False)
-        self.assertUrl(u, 'foo', 'u', 'p', 'bar', 1234, 'garden')
-        u = Url(defaults=False)
-        self.assertUrl(u, None, None, None, None, None, None)
-
-    def assertRaises(self, exception, function, *args, **kwargs):
-        try:
-            function(*args, **kwargs)
-            assert False, "Expected exception %s" % exception.__name__
-        except exception: pass
-
-    def testMissing(self):
-        self.assertUrl(Url(defaults=False), None, None, None, None, None, None)
-        self.assertUrl(Url('amqp://', defaults=False), 'amqp', None, None, None, None, None)
-        self.assertUrl(Url('username@', defaults=False), None, 'username', None, None, None,
None)
-        self.assertUrl(Url(':pass@', defaults=False), None, '', 'pass', None, None, None)
-        self.assertUrl(Url('host', defaults=False), None, None, None, 'host', None, None)
-        self.assertUrl(Url(':1234', defaults=False), None, None, None, None, 1234, None)
-        self.assertUrl(Url('/path', defaults=False), None, None, None, None, None, 'path')
-
-        for s, full in [
-            ('amqp://', 'amqp://'),
-            ('username@','//username@'),
-            (':pass@', '//:pass@'),
-            (':1234', '//:1234'),
-            ('/path','/path')
-        ]:
-            self.assertEqual(str(Url(s, defaults=False)), full)
-
-        for s, full in [
-                ('amqp://', 'amqp://0.0.0.0:amqp'),
-                ('username@', 'amqp://username@0.0.0.0:amqp'),
-                (':pass@', 'amqp://:pass@0.0.0.0:amqp'),
-                (':1234', 'amqp://0.0.0.0:1234'),
-                ('/path', 'amqp://0.0.0.0:amqp/path'),
-                ('foo/path', 'amqp://foo:amqp/path'),
-                (':1234/path', 'amqp://0.0.0.0:1234/path')
-        ]:
-            self.assertEqual(str(Url(s)), full)
-
-    def testAmqps(self):
-        # Scheme defaults
-        self.assertEqual(str(Url("me:secret@myhost/foobar")),
-                         "amqp://me:secret@myhost:amqp/foobar")
-        # Correct port for amqps vs. amqps
-        self.assertEqual(str(Url("amqps://me:secret@myhost/foobar")),
-                         "amqps://me:secret@myhost:amqps/foobar")
-
-        self.assertPort(Url.Port('amqps'), 5671, 'amqps')
-        self.assertEqual(str(Url("host:amqps", defaults=False)), "//host:amqps")
-        self.assertEqual(Url("host:amqps", defaults=False).port, 5671)
-
-    def testEqual(self):
-        self.assertEqual(Url("foo/path"), 'amqp://foo:amqp/path')
-        self.assertEqual('amqp://foo:amqp/path', Url("foo/path"))
-        self.assertEqual(Url("foo/path"), Url("foo/path"))
-        self.assertNotEqual(Url("foo/path"), 'xamqp://foo:amqp/path')
-        self.assertNotEqual('xamqp://foo:amqp/path', Url("foo/path"))
-        self.assertNotEqual(Url("foo/path"), Url("bar/path"))

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9778eda8/tests/python/proton_tests/utils.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/utils.py b/tests/python/proton_tests/utils.py
deleted file mode 100644
index 1f20bba..0000000
--- a/tests/python/proton_tests/utils.py
+++ /dev/null
@@ -1,163 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-import os, time, sys
-from threading import Thread, Event
-from unittest import TestCase
-from proton_tests.common import Test, free_tcp_port
-from copy import copy
-from proton import Message, Url, generate_uuid, Array, UNDESCRIBED, Data, symbol, ConnectionException,
ProtonException
-from proton.handlers import MessagingHandler
-from proton.reactor import Container
-from proton.utils import SyncRequestResponse, BlockingConnection
-from .common import Skipped, ensureCanTestExtendedSASL
-CONNECTION_PROPERTIES={u'connection': u'properties'}
-OFFERED_CAPABILITIES = Array(UNDESCRIBED, Data.SYMBOL, symbol("O_one"), symbol("O_two"),
symbol("O_three"))
-DESIRED_CAPABILITIES = Array(UNDESCRIBED, Data.SYMBOL, symbol("D_one"), symbol("D_two"),
symbol("D_three"))
-ANONYMOUS='ANONYMOUS'
-EXTERNAL='EXTERNAL'
-
-class EchoServer(MessagingHandler, Thread):
-    """
-    Simple echo server that echos messages to their reply-to. Runs in a thread.
-    Will only accept a single connection and shut down when that connection closes.
-    """
-
-    def __init__(self, url, timeout):
-        MessagingHandler.__init__(self)
-        Thread.__init__(self)
-        self.daemon = True
-        self.timeout = timeout
-        self.url = url
-        self.senders = {}
-        self.container = None
-        self.event = Event()
-
-    def on_start(self, event):
-        self.acceptor = event.container.listen(self.url)
-        self.container = event.container
-        self.event.set()
-
-    def on_link_opening(self, event):
-        if event.link.is_sender:
-            if event.link.remote_source and event.link.remote_source.dynamic:
-                event.link.source.address = str(generate_uuid())
-                self.senders[event.link.source.address] = event.link
-
-    def on_message(self, event):
-        m = event.message
-        sender = self.senders.get(m.reply_to)
-        if sender:
-            reply = Message(address=m.reply_to, body=m.body, correlation_id=m.correlation_id)
-            sender.send(reply)
-
-    def on_connection_closing(self, event):
-        self.acceptor.close()
-
-    def on_transport_error(self, event):
-        self.acceptor.close()
-
-    def run(self):
-        Container(self).run()
-
-    def wait(self):
-        self.event.wait(self.timeout)
-
-
-class ConnPropertiesServer(EchoServer):
-     def __init__(self, url, timeout):
-        EchoServer.__init__(self, url, timeout)
-        self.properties_received = False
-        self.offered_capabilities_received = False
-        self.desired_capabilities_received = False
-
-     def on_connection_opening(self, event):
-        conn = event.connection
-
-        if conn.remote_properties == CONNECTION_PROPERTIES:
-            self.properties_received = True
-        if conn.remote_offered_capabilities == OFFERED_CAPABILITIES:
-            self.offered_capabilities_received = True
-        if conn.remote_desired_capabilities == DESIRED_CAPABILITIES:
-            self.desired_capabilities_received = True
-
-class SyncRequestResponseTest(Test):
-    """Test SyncRequestResponse"""
-
-    def test_request_response(self):
-        ensureCanTestExtendedSASL()
-        def test(name, address="x"):
-            for i in range(5):
-                body="%s%s" % (name, i)
-                response = client.call(Message(address=address, body=body))
-                self.assertEquals(response.address, client.reply_to)
-                self.assertEquals(response.body, body)
-
-        server = EchoServer(Url(host="127.0.0.1", port=free_tcp_port()), self.timeout)
-        server.start()
-        server.wait()
-        connection = BlockingConnection(server.url, timeout=self.timeout)
-        client = SyncRequestResponse(connection)
-        try:
-            test("foo")         # Simple request/resposne
-        finally:
-            client.connection.close()
-        server.join(timeout=self.timeout)
-
-
-    def test_connection_properties(self):
-        ensureCanTestExtendedSASL()
-        server = ConnPropertiesServer(Url(host="127.0.0.1", port=free_tcp_port()), timeout=self.timeout)
-        server.start()
-        server.wait()
-        connection = BlockingConnection(server.url, timeout=self.timeout, properties=CONNECTION_PROPERTIES,
offered_capabilities=OFFERED_CAPABILITIES, desired_capabilities=DESIRED_CAPABILITIES)
-        client = SyncRequestResponse(connection)
-        client.connection.close()
-        server.join(timeout=self.timeout)
-        self.assertEquals(server.properties_received, True)
-        self.assertEquals(server.offered_capabilities_received, True)
-        self.assertEquals(server.desired_capabilities_received, True)
-
-    def test_allowed_mechs_external(self):
-        # All this test does it make sure that if we pass allowed_mechs to BlockingConnection,
it is actually used.
-        port = free_tcp_port()
-        server = ConnPropertiesServer(Url(host="127.0.0.1", port=port), timeout=self.timeout)
-        server.start()
-        server.wait()
-        try:
-            # This will cause an exception because we are specifying allowed_mechs as EXTERNAL.
The SASL handshake will fail because the server is not setup to handle EXTERNAL
-            connection = BlockingConnection(server.url, timeout=self.timeout, properties=CONNECTION_PROPERTIES,
offered_capabilities=OFFERED_CAPABILITIES, desired_capabilities=DESIRED_CAPABILITIES, allowed_mechs=EXTERNAL)
-            self.fail("Expected ConnectionException")
-        except ConnectionException as e:
-            self.assertTrue('amqp:unauthorized-access' in str(e), "expected unauthorized-access")
-        server.join(timeout=self.timeout)
-
-    def test_allowed_mechs_anonymous(self):
-        # All this test does it make sure that if we pass allowed_mechs to BlockingConnection,
it is actually used.
-        server = ConnPropertiesServer(Url(host="127.0.0.1", port=free_tcp_port()), timeout=self.timeout)
-        server.start()
-        server.wait()
-        # An ANONYMOUS allowed_mechs will work, anonymous connections are allowed by ConnPropertiesServer
-        connection = BlockingConnection(server.url, timeout=self.timeout, properties=CONNECTION_PROPERTIES,
offered_capabilities=OFFERED_CAPABILITIES, desired_capabilities=DESIRED_CAPABILITIES, allowed_mechs=ANONYMOUS)
-        client = SyncRequestResponse(connection)
-        client.connection.close()
-        server.join(timeout=self.timeout)
-        self.assertEquals(server.properties_received, True)
-        self.assertEquals(server.offered_capabilities_received, True)
-        self.assertEquals(server.desired_capabilities_received, True)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9778eda8/tests/python/tox-blacklist
----------------------------------------------------------------------
diff --git a/tests/python/tox-blacklist b/tests/python/tox-blacklist
deleted file mode 100644
index 3c10c71..0000000
--- a/tests/python/tox-blacklist
+++ /dev/null
@@ -1,13 +0,0 @@
-# Running *all* the python tests under tox is redundant as this is
-# already done by the python-test suite.
-# This file contains a list of the longer running tests that can be
-# skipped in order to speed up the tox test run
-
-proton_tests.soak.*
-proton_tests.engine.ServerTest.testIdleTimeout
-proton_tests.engine.ServerTest.testKeepalive
-proton_tests.messenger.IdleTimeoutTest.testIdleTimeout
-proton_tests.messenger.MessengerTest.testCreditBlockingRebalance
-proton_tests.messenger.NBMessengerTest.testCreditReplenish
-proton_tests.messenger.NBMessengerTest.testRecvBeforeSubscribe
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message