Commit 0372eb69 authored by Michal Čihař's avatar Michal Čihař

Skip test on network error

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent fd93ffe6
......@@ -22,6 +22,7 @@ from weblate.trans.tests.test_views import ViewTestCase
import weblate.trans.admin_views
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.utils.unittest import SkipTest
from weblate.trans.tests.test_util import get_test_file
import tempfile
import shutil
......@@ -84,6 +85,8 @@ class AdminTest(ViewTestCase):
reverse('admin-ssh'),
{'action': 'add-host', 'host': 'github.com'}
)
if 'Name or service not known' in response.content:
raise SkipTest('Network error')
self.assertContains(response, 'Added host key for github.com')
# Check the file contains it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment