From 1af2f4b55e03061bb3b88ac101c6a47956d025a1 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Thu, 30 May 2019 18:09:33 +0200 Subject: #915 add test for GET /clients REST API --- tests/units/0001-get-clients.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/units/0001-get-clients.py (limited to 'tests') 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() -- cgit v1.2.3-18-g5258