summaryrefslogtreecommitdiffstats
path: root/tests/units
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2019-09-19 15:49:39 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-09-19 16:06:03 +0200
commitc1c89e196c7ecbc91dd1f3237cd546ef633490c4 (patch)
tree3863be29a0c295dc8f61cd8e5b82694d9607edb8 /tests/units
parent55edb404b754c3dd817289e35d67505a476e7dbf (diff)
#915: Return 400 status code in POST methods when no payload is attached
If no payload is attached to method that requires a payload, then the API returns a 400 status code (following RFC 7231) instead of the previous 404. test_0001_get_clients.py is also modified to fit the new status code.
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/test_0001_get_clients.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/units/test_0001_get_clients.py b/tests/units/test_0001_get_clients.py
index 8d52bb8..218b41a 100644
--- a/tests/units/test_0001_get_clients.py
+++ b/tests/units/test_0001_get_clients.py
@@ -13,7 +13,7 @@ class TestGetClientsMethods(unittest.TestCase):
def test_post_without_data(self):
returned = requests.post(self.url, headers=self.headers)
- self.assertEqual(returned.status_code, 404)
+ self.assertEqual(returned.status_code, 400)
if __name__ == '__main__':
unittest.main()