blob: cbc5aaf94fff48eeaa3546e9a7da36ec97c372b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# coding=utf-8
"""
Make sure the webbrowser extension is working.
"""
import launch_webbrowser
from inkex.tester import TestCase
class TestWebsiteOpen(TestCase):
"""Test Website openner with dummy web browser"""
effect_class = launch_webbrowser.ThreadWebsite
def setUp(self):
super(TestWebsiteOpen, self).setUp()
launch_webbrowser.BROWSER = 'echo %s'
def tearDown(self):
super(TestWebsiteOpen, self).tearDown()
launch_webbrowser.BROWSER = None
def test_open(self):
"""Test website opens"""
self.effect_class(['--url=https://inkscape.org/']).run()
# There's no way to test the output yet (stdout).
|