diff --git a/.travis.yml b/.travis.yml
index c543946cfc4b212e6e4319468dbcce4ca522d8c7..f8d72addd5b40987096c2feb926b8dc940da4395 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,9 @@
   "install": [
     "pip install -r requirements.txt"
   ],
+  "script": [
+    "pytest"
+  ],
   "group": "stable",
   "dist": "trusty",
   "os": "linux"
diff --git a/gandi-ddns.py b/gandi-ddns.py
index e71ae3b542307db9aa7aadc8651c6a71dc897cd0..dcf6bd39e7bb59254d218cf1169db7cb6ba65dbe 100755
--- a/gandi-ddns.py
+++ b/gandi-ddns.py
@@ -95,4 +95,4 @@ def main():
     update_record(url, headers, payload)
 
 if __name__ == "__main__":
-  main()
+  main()
\ No newline at end of file
diff --git a/test_gandi-ddns.py b/test_gandi-ddns.py
new file mode 100644
index 0000000000000000000000000000000000000000..a7d143a3fd70633cdf25d30d61cc88a6d8954e82
--- /dev/null
+++ b/test_gandi-ddns.py
@@ -0,0 +1,4 @@
+import gandi-ddns as script
+
+def test_get_ip():
+    assert script.get_ip() == 'test-toto'
\ No newline at end of file