summaryrefslogtreecommitdiffstats
path: root/share/extensions/tests/test_launch_webbrowser.py
diff options
context:
space:
mode:
Diffstat (limited to 'share/extensions/tests/test_launch_webbrowser.py')
-rw-r--r--share/extensions/tests/test_launch_webbrowser.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/share/extensions/tests/test_launch_webbrowser.py b/share/extensions/tests/test_launch_webbrowser.py
new file mode 100644
index 0000000..cbc5aaf
--- /dev/null
+++ b/share/extensions/tests/test_launch_webbrowser.py
@@ -0,0 +1,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).