summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2019-05-30 18:09:33 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-05-31 11:38:52 +0200
commit7137439d0b41c03c5ca0eeed67ab726efabcd391 (patch)
tree850171aabb2c77c1ce58db69f3b52af2c1f41ad0 /admin
parent58ac5495f765df7da902d875af5fe8796b44dce0 (diff)
#915 add test for GET /clients REST API
Diffstat (limited to 'admin')
-rw-r--r--admin/Sources/Services/ogAdmServer/tests/units/0001-get-clients.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/admin/Sources/Services/ogAdmServer/tests/units/0001-get-clients.py b/admin/Sources/Services/ogAdmServer/tests/units/0001-get-clients.py
new file mode 100644
index 00000000..e3247eb4
--- /dev/null
+++ b/admin/Sources/Services/ogAdmServer/tests/units/0001-get-clients.py
@@ -0,0 +1,18 @@
+import requests
+import unittest
+
+class TestGetClientsMethods(unittest.TestCase):
+
+ def setUp(self):
+ self.url = 'http://localhost:8888/clients'
+
+ def test_get(self):
+ returned = requests.get(self.url)
+ self.assertEqual(returned.status_code, 200)
+
+ def test_post(self):
+ returned = requests.post(self.url)
+ self.assertEqual(returned.status_code, 404)
+
+if __name__ == '__main__':
+ unittest.main()