File: test_tornado_bind_unused_port.py

package info (click to toggle)
python-httpretty 1.1.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 712 kB
  • sloc: python: 4,233; makefile: 72
file content (18 lines) | stat: -rw-r--r-- 373 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import httpretty
from unittest import skip
from tornado.testing import bind_unused_port


@skip('')
@httpretty.activate(allow_net_connect=True)
def test_passthrough_binding_socket():
    # issue #247

    result = bind_unused_port()
    result.should.be.a(tuple)
    result.should.have.length_of(2)

    socket, port = result

    port.should.be.an(int)
    socket.close()