Merge pull request #120 from r4v5/fix-travis

Fix the travis build
This commit is contained in:
Micah Lee 2014-09-02 17:12:05 -07:00
commit 3ce43a65b6
3 changed files with 7 additions and 2 deletions

4
.gitignore vendored
View file

@ -37,5 +37,9 @@ nosetests.xml
# vim # vim
*.swp *.swp
# tags
ctags
tags
# OSX # OSX
.DS_Store .DS_Store

View file

@ -3,8 +3,8 @@ python:
- "2.6" - "2.6"
- "2.7" - "2.7"
# command to install dependencies # command to install dependencies
before_install: "sudo apt-get install -y build-essential fakeroot python-all python-stdeb python-flask python-qt4 python-socksipy" before_install: "sudo apt-get install -y build-essential fakeroot python-all python-stdeb python-qt4"
install: "pip install nose flask stem" install: "pip install nose flask stem pysocks"
# command to run tests # command to run tests
script: nosetests test script: nosetests test

View file

@ -23,6 +23,7 @@ from nose import with_setup
def test_choose_port_returns_a_port_number(): def test_choose_port_returns_a_port_number():
"choose_port() returns a port number" "choose_port() returns a port number"
app = OnionShare() app = OnionShare()
app.choose_port()
assert 1024 <= app.port <= 65535 assert 1024 <= app.port <= 65535
def test_choose_port_returns_an_open_port(): def test_choose_port_returns_an_open_port():