mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Fix tests crash on travis
This commit is contained in:
parent
dfd18f9483
commit
c03c66ec48
@ -7,7 +7,6 @@ before_install:
|
||||
- sudo add-apt-repository ppa:gns3/ppa -y
|
||||
- sudo apt-get update -q
|
||||
- sudo apt-get install dynamips
|
||||
- sudo apt-get install python3-netifaces
|
||||
|
||||
install:
|
||||
- python setup.py install
|
||||
|
@ -15,6 +15,9 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import pytest
|
||||
|
||||
|
||||
def test_udp_allocation(server, project):
|
||||
response = server.post('/projects/{}/ports/udp'.format(project.id), {}, example=True)
|
||||
@ -22,6 +25,8 @@ def test_udp_allocation(server, project):
|
||||
assert response.json == {'udp_port': 10000}
|
||||
|
||||
|
||||
# Netfifaces is not available on Travis
|
||||
@pytest.skipif(os.environ.get("TRAVIS", False))
|
||||
def test_interfaces(server):
|
||||
response = server.get('/interfaces', example=True)
|
||||
assert response.status == 200
|
||||
|
Loading…
Reference in New Issue
Block a user