diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2019-05-30 18:09:33 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-05-31 11:38:52 +0200 |
commit | 1af2f4b55e03061bb3b88ac101c6a47956d025a1 (patch) | |
tree | ab45a6cca1aa8dfd4cf02f4e61285e39411377c8 /tests | |
parent | 727a109f7d79f8ad182ec3a353198e84fe7dfcdd (diff) |
#915 add test for GET /clients REST API
Diffstat (limited to 'tests')
-rw-r--r-- | tests/units/0001-get-clients.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/units/0001-get-clients.py b/tests/units/0001-get-clients.py new file mode 100644 index 0000000..e3247eb --- /dev/null +++ b/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() |