summaryrefslogtreecommitdiff
path: root/tests/components/taler_service.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/components/taler_service.py')
-rw-r--r--tests/components/taler_service.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/components/taler_service.py b/tests/components/taler_service.py
new file mode 100644
index 000000000..9fce9395c
--- /dev/null
+++ b/tests/components/taler_service.py
@@ -0,0 +1,18 @@
+import requests
+from requests.exceptions import ConnectionError
+
+
+class TalerService:
+
+ def __init__(self, config, watcher_getter, request):
+ self.config = config
+ self.watcher_getter = watcher_getter
+ self.request = request
+
+ def test_url(self):
+ try:
+ requests.get(self.url, timeout=3)
+ except ConnectionError as e:
+ return False
+ else:
+ return True